Usage of more advanced SourceValidity implementations

ExpiresValidity

This content has been generated at

Caching configuration is jx:cache-key="abc" jx:cache-validity="$ {Packages.org.apache.excalibur.source.impl.validity.ExpiresValidity(10000)}"

This means that once the content is generated it expires after 10 seconds.
The cache key is static so there will only be one instance of cached document.
You may of course mix various cache key generation strategies with different validities.
Choose an existing SourceValidity (javadoc) implementation or create your own.

You may try to reload the page and see if generation date changes.
You may try to define additional request parameters to see that it does not change a thing.

Next sample: none.
Go back to Cocoon Template samples.