> From: Tsui, Alban [mailto:[EMAIL PROTECTED]]
> 
> Thanks for your info and example. Though I am a bit lost. So how is
the key
> and the cacheValidity being used for the cocoon caching mechanism?

Key identifies the object in the cache. Every unique key is one cached
object. Think of cache as of jav.util.Map - and key is the same thing as
the key of the Map.

Validity object is to check whether this cached object is still valid or
not. Whether to use cached object or discard it and regenerate content
from the scratch.

For XSP with DB access, validity could be last modification time of the
database record.


> Say, if I am generating the same key, does that mean the object is
cached?

Yes, but see above.

> Or if I return the same CacheValidity object, does that also mean the
> pipeline resutl is cached and reused?

Yes.


> I want to cache based on the input url/request-parameters in some
ways...
> does that simply mean I have to write my own CacheValidity class?

Most of the cache validity classes already written. However, in your
case, consider adding request parameters to the key. Cacheable.xsp
already have something similar - caching depending on request parameter.

Vadim


> > -----Original Message-----
> > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > Sent: 25 February 2002 17:06
> > To: [EMAIL PROTECTED]
> > Subject: RE: various caching in xsp?
> >
> >
> > Source:
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/docs/
> > samples/xs
> > p/cacheable.xsp?rev=1.5&content-type=text/vnd.viewcvs-markup
> >
> > URL in samples webapp:
> > http://localhost:8080/cocoon/xsp/cacheable
> >
> >
> > Vadim
> >
> > > -----Original Message-----
> > > From: Tsui, Alban [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 25, 2002 11:41 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: various caching in xsp?
> > >
> > > Hi
> > > I want to do pipeline caching and I have been browsing the cocoon
> > (2.0)
> > > source and notice that there is this class
> > >
> > > DeltaTimeCacheValidity and other various classes.
> > >
> > > I have been told that it is possible to control caching in XSP but
I
> > don't
> > > know how to start. Say if I want to use the above
> > DeltaTimeCacheValidity,
> > > how would I implement it in my xsp and my pipeline in my sitemap?
An
> > example
> > > would be appreciated.
> > >
> > > Best wishes
> > >
> > > Alban Tsui


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to