It happens that in short notice I will be giving advanced level cocoon
caching course. You might want to consider joining if your boss allows
you to :-) It will cover all kinds of caching starting basic from
caching in browsers, from browser to proxy, from browser/proxy to
application, between applications (Cocoon-Slide), Cocoon pipeline
(event/expires)caching, internal component caching, SourceValidities
like TimeStamp, Expires, NopValidity, EventValidities + JMS, Cocoon
status page + understanding what's in, what caches are available, etc
etc, and a set of tools to help you understand where your caching fails.
>
> We have developed a Custom Action, which only prints some
> logging. Now we are looking at the caching and this
> interrupts our caching.
>From what do you conclude that it interrupts your caching? That even for
pipelines which should be cached, still the log is being created? This
is perfectly sensible and correct, even in cached pipelines.
> I was looking through the cocoon
> documentation and found something about caching, but I want
> to make sure I understand it.
>
> If I have the following code, will this interrupt with the caching?
It is unrelated to caching, so no. But without it, it does not interrupt
caching either :-)
>
> public class LogAction extends AbstractAction implements
> ThreadSafe, CacheableProcessingComponent {
*Actions* never implement CacheableProcessingComponent!! You can
implement it, but getKey() or getValidity will never be called.
CacheableProcessingComponent only serves for caching of
SitemapModelComponents (like generator, transformers and serializers).
Actions are unique sitemap components merely used to perform processing.
This means, even in cached pipelines, they are called.
What would be to cache about an action anyway? See [1] and [2] for
documentation about Actions and CacheableProcessingComponent contracts
> LogLevel logLevel = LogLevel.valueOf(level.toUpperCase());
> logLevel.log(getLogger(), msg);
Just to be sure, this LogLevel class does check for something like,
this.getLogger().isDebugEnabled()
this.getLogger().isWarnEnabled()
Etc? Not checking this is quite costly.
[1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g2/g1/g2/676.html
[2] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g2/g1/g1/675.html
********************************************
Hippocms-dev: Hippo CMS development public mailinglist