Jörn Nettingsmeier schrieb:
Andreas Hartmann wrote:
Jörn Nettingsmeier schrieb:
i'm not sure i understand vadim's comment, though:

Vadim Gritsenko - 07/Feb/08 07:28 PM You should differentiate the
case when source exists but not cacheable, and when source does not
exist. Otherwise you will be caching what must not be cached.
isn't that what

   return (newValidity == null) ? SourceValidity.VALID
                                : SourceValidity.INVALID;
I think the problem is that "Source.getValidity() == null" doesn't tell
you if the source doesn't exist or just can't be cached.

ah, ok. i thought null meant "does not exist", and for all existing
sources, there'd be a validity object that would indicate if it's
cacheable or not...

I thought so too, but a look at the Excalibur Source javadocs indicates a different behaviour, which is IMO a bit fuzzy:

   **
* Get the Validity object. This can either wrap the last modification date or * some expiry information or anything else describing this object's validity.
   * <p>
   * If it is currently not possible to calculate such an information,
   * <code>null</code> is returned.
   *
   * @return the validity, or <code>null</code>.
   */
  SourceValidity getValidity();


IMO the whole
null value business is a PITA [1]. I'll try to find out if it can
determined if the source really doesn't exist. Unfortunately, the
SitemapSource doesn't seem to be very cooperative in this regard. For
our scenario the patch probably works,

maybe, but it's a huge potential bug....

Yes, I agree.

maybe we can use a
special-purpose subclass of the InludeTransformer / MultiSourceValidity.

not so nice imho - let's keep close to cocoon. this feature would make
sense for others as well, so it should go upstream. maybe the thread you
started on cocoon-dev turns up something useful..

I hope so too. Maybe I get more insights into the source validity handling after some more debugging sessions.

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to