cache

Purpose

Defines cache values.

Contained by

Attributes

Attribute Description Type Default Options Use
expiry-mode The caching operation supports two different strategies for determining whether an entry in the cache has expired: 'auto' and 'fixed-age'. In 'auto' mode the cache operation collates dependency information about the sources used to generate the content and uses that information to check the validity of the cached content and revalidate if necessary. The operation relies on the information supplied by the sources and therefore using sources that do not provide that information will prevent the cache from being effective. In 'fixed-age' mode the cache operation ignores any cache control information provided by the original sources and instead uses a time to live value supplied to the operation by the page author. In this mode the cache can require a lot of manual management as it will not automatically detect changes in the external sources from which the cached content was generated. If specified, then it overrides the value set by the expiry-mode attribute on the caching-operation element. This global value may be overridden at pipeline:cache element level. xs:string auto  fixed-age, auto  optional 
max-age The maximum period in seconds that an entry may remain in the cache xs:nonNegativeInteger or 'unlimited' unlimited    optional 
max-entries The maximum number of entries in the cache. xs:int none    required 
name The name of the cache xs:string none    required 
strategy Defines cache strategy xs:string least-recently-used  least-used, least-recently-used  optional 

Example

<style-sheets> 
  <internal-generation>    
    <cache name="styleCache"      
      strategy="least-recently-used"
      max-entries="25"
      max-age="86400"/>  
  </internal-generation> 
</style-sheets>

Related topics