You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Geoff Howard <co...@leverageweb.com> on 2003/07/12 23:41:42 UTC
IncludeCacheManager
Can someone (Carsten?) give an overview of what
org.apache.cocoon.transformation.helpers.IncludeCacheManager and friends
is (are)? I see that cinclude uses it to cache content, and I see the
recent addition to parameterize rather than configure which store to use
- what I'm concerned about is the effect on other subsystems that rely
on the notion which to this point has been reliable, if not an explicit
contract:
Cache (wraps) Transient Store (may use) Persistent Store
encapsulating all cached Pipelines.
For example, with IncludeCacheManager using a potentially different
store, the StatusGenerator and the un-cache actions (and any parallels
in flow) will fail to find all cached content unless I have missed
something in the new code (which I haven't thoroughly read, so please
forgive me if I missed it).
I've been working on event driven cache invalidation and need to
understand if there is a new contract surrounding where CachedContent
can live and if this new stuff presents a real or only theoretical
conflict. I'm really only referring to CachedResponse objects stored
under PipelineCacheKeys.
Do others see a need to solidify this contract?
Looking into the cinlude transformer, I have the following questions:
- Why is this separate caching needed? Why not just use the cocoon:
protocol to call a cacheable pipeline?
- Does the configurable/parameterizable cache exist only for this reason
from the javadocs?:
"
Usually the content is cached in the usual store, but you
* can also define a writeable source with the <code>source</code>
parameter,
* e.g. "file:/c:/temp". Then the cached content is written into this
* directory.
"
I can't get my pea brain around why one would want/need to do that and
not just configure the existing persistent store as they choose.
It seems to me that the business of the cinclude transformer should be
to support cacheability of included pipelines but not actually interact
with the cache - that seems to be the business of the pipeline. Am I
way off?
Geoff
Re: IncludeCacheManager
Posted by Geoff Howard <co...@leverageweb.com>.
Carsten Ziegeler wrote:
> Geoff Howard wrote
>
>>>>It seems to me that the business of the cinclude transformer should be
>>>>to support cacheability of included pipelines but not actually
>>>>interact with the cache - that seems to be the business of the
>>>>pipeline. Am I way off?
>>>
>>>IncludeCacheManager puzzles me too. May be we are off together? :)
>>
>>Maybe it's the heat?
>>
> It really must be the heat that I didn't saw this thread earlier! I only
> have this mail and not the original mail, so if there is more interest
> let me know.
>
>>So, any idea who knows about this?
>
> To get the person in charge, look at the author tags...ok, you don't have
> to, I'm the one writing the IncludeCacheManager...and it's a really cool
> component!
I did see you on the author tag, and on recent commits, but figured it
still could be anyone.
> Now, the caching of the IncludeCacheManager is different from the usual
> cocoon caching. The IncludeCacheManager caches the response of an
> included (via cinclude) resource for a defined time. So it always
> caches the whole response regardless if e.g. a pipeline is used for
> the included content or an http request. In addition the content
> is valid for the defined period of time, regardless what the source
> might say by looking at last modified etc.
> So, the IncludeCacheManager has in fact nothing to do with the Cocoon
> Pipeline Cache, but has an own approach for the included content.
>
> Now, actually you can fine-tune your application with this. E.g. you
> can use the cinclude transformer to include dynamic data with the
> usual cinclude tag and also at the same time cached content using
> the cached-cinclude tag.
> A customer of us uses this approach in production and is really impressed
> by the performance boost this component gave them (while maintaining
> compatibility and flexibility at the same time).
OK, I kind of see.
I wonder if a more general solution using delegation would work too?
There is a patch in bugzilla that Unico Hommes worked up specifically
for the event based cache, but its use could be more general.
I think my immediate question is answered - because this lives outside
the normal Cache, anything that relies on Cache (which may be nothing
except the stuff I'm working on?) will need special handling if it needs
to take IncludeCached content into consideration.
Geoff
RE: IncludeCacheManager
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Geoff Howard wrote
> >
> >> It seems to me that the business of the cinclude transformer should be
> >> to support cacheability of included pipelines but not actually
> >> interact with the cache - that seems to be the business of the
> >> pipeline. Am I way off?
> >
> > IncludeCacheManager puzzles me too. May be we are off together? :)
>
> Maybe it's the heat?
>
It really must be the heat that I didn't saw this thread earlier! I only
have this mail and not the original mail, so if there is more interest
let me know.
> So, any idea who knows about this?
To get the person in charge, look at the author tags...ok, you don't have
to, I'm the one writing the IncludeCacheManager...and it's a really cool
component!
Now, the caching of the IncludeCacheManager is different from the usual
cocoon caching. The IncludeCacheManager caches the response of an
included (via cinclude) resource for a defined time. So it always
caches the whole response regardless if e.g. a pipeline is used for
the included content or an http request. In addition the content
is valid for the defined period of time, regardless what the source
might say by looking at last modified etc.
So, the IncludeCacheManager has in fact nothing to do with the Cocoon
Pipeline Cache, but has an own approach for the included content.
Now, actually you can fine-tune your application with this. E.g. you
can use the cinclude transformer to include dynamic data with the
usual cinclude tag and also at the same time cached content using
the cached-cinclude tag.
A customer of us uses this approach in production and is really impressed
by the performance boost this component gave them (while maintaining
compatibility and flexibility at the same time).
HTH
Carsten
Re: IncludeCacheManager
Posted by Geoff Howard <co...@leverageweb.com>.
Vadim Gritsenko wrote:
> Geoff Howard wrote:
> ....
>
>> It seems to me that the business of the cinclude transformer should be
>> to support cacheability of included pipelines but not actually
>> interact with the cache - that seems to be the business of the
>> pipeline. Am I way off?
>
> IncludeCacheManager puzzles me too. May be we are off together? :)
Maybe it's the heat?
So, any idea who knows about this? I can start digging through cvs but
there's a good chance I'll get to "initial import" before finding it. I
guess I then go to "historical" but haven't done that yet. Sure would
save a lot of time if someone just knows about this.
Geoff
Re: IncludeCacheManager
Posted by Vadim Gritsenko <va...@verizon.net>.
Geoff Howard wrote:
....
> It seems to me that the business of the cinclude transformer should be
> to support cacheability of included pipelines but not actually
> interact with the cache - that seems to be the business of the
> pipeline. Am I way off?
IncludeCacheManager puzzles me too. May be we are off together? :)
Vadim