Tuesday 6 January 2015

To make resources cacheable, the resource aggregator provides a generic mechanism where it defines the cache settings for a single URI, URI patterns or contribution types. These settings are then passed to the data source, which determines whether these settings are considered.

Caching information is set in the WP ConfigService resource environment provider. The available settings are:
com.ibm.wps.resourceaggregator.cache.info.<id>.type
The values can be set as uri or contributiontype.
com.ibm.wps.resourceaggregator.cache.info.<id>.re
The value is a regular expression that can be matched against a URI when uri is defined as the type, or a contribution type when contributiontype is set for the type.
com.ibm.wps.resourceaggregator.cache.info.<id>.max-age
The value is the maximum age of the resource in seconds.
com.ibm.wps.resourceaggregator.cache.info.<id>.cache-scope
The value is public when this resource can be cached in an external caching infrastructure or private if it cannot.
com.ibm.wps.resourceaggregator.cache.info.<id>.user-context

The value is false if this resource is shared between users, and true if the value is user specific.


com.ibm.wps.resourceaggregator.cache.info.0.type uri 
           
com.ibm.wps.resourceaggregator.cache.info.0.re   .*\.(js|css|xml) 
 
com.ibm.wps.resourceaggregator.cache.info.0.max-age 86400 
           
com.ibm.wps.resourceaggregator.cache.info.0.cache-scope public 
                       
com.ibm.wps.resourceaggregator.cache.info.0.user-context false 
           
com.ibm.wps.resourceaggregator.cache.info.0.project-context false 
           
com.ibm.wps.resourceaggregator.cache.info.1.type contributiontype 
           
com.ibm.wps.resourceaggregator.cache.info.1.re config_static 
           
com.ibm.wps.resourceaggregator.cache.info.1.max-age 86400 
           
com.ibm.wps.resourceaggregator.cache.info.1.cache-scope public   true 
           
com.ibm.wps.resourceaggregator.cache.info.1.user-context false 
                       
com.ibm.wps.resourceaggregator.cache.info.1.project-context false 

No comments:

Post a Comment