|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CachePolicy
The CachePolicy determines is a requested page should be cached, retrieved from the cache or not cached at all. It is called for every request and should thus also take care of any expiration policy - i.e if the page should be recached. The CacheFilter (or any other client component) can determine its behaviour based on the return CachePolicyResult, which holds both the behaviour to take and the cache key to use when appropriate.
Method Summary | |
---|---|
void |
persistCacheKey(String repo,
String uuid,
Object key)
Presists mapping between uuid and cache key in case the given cache policy implementation cares about such details. |
Object[] |
removeCacheKeys(String uuid,
String repository)
Returns cache keys for the given item or null if such keys can't be obtained or policy doesn't want to share it. |
Object |
retrieveCacheKey(AggregationState aggregationState)
Returns cache key for the given item or null if such key can't be obtained or policy doesn't want to share it. |
Object[] |
retrieveCacheKeys(String uuid,
String repository)
Returns cache keys for the given item or null if such keys can't be obtained or policy doesn't want to share it. |
CachePolicyResult |
shouldCache(Cache cache,
AggregationState aggregationState,
FlushPolicy flushPolicy)
Implementations can chose whether to cache or not - but note that the aggregationState might not be completely populated. |
Method Detail |
---|
CachePolicyResult shouldCache(Cache cache, AggregationState aggregationState, FlushPolicy flushPolicy)
Object retrieveCacheKey(AggregationState aggregationState)
Object[] retrieveCacheKeys(String uuid, String repository)
void persistCacheKey(String repo, String uuid, Object key)
Object[] removeCacheKeys(String uuid, String repository)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |