|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache
The Cache is an optional service for caching
content.
A content is identified by a unique key and is associated with
a CacheValue storing meta information about the cached
content.
The cache has no knowledge about the content type it stores, therefore
it is up to the client of the cache to generate unique cache keys. The
CacheKeyGenerator service is used for this.
Cached content can either be removed or the cache itself can have an
internal mechanism to invalidate cached content (e.g. by using an epxires
information).
| Method Summary | |
|---|---|
void |
clearCache()
Clear the cache. |
CacheValue |
getCacheEntry(String key)
Get a cached value for the unique key. |
Collection<String> |
getKeys()
Return all currently available keys. |
void |
putCacheEntry(String key,
CacheValue cachedResponse)
Put a cached content into the cache. |
boolean |
removeCacheEntry(String key)
Remove the content with the unique key from the cache. |
| Method Detail |
|---|
CacheValue getCacheEntry(String key)
key - The cache key
CacheValue or null if there is no valid content
for the key.
void putCacheEntry(String key,
CacheValue cachedResponse)
key - The cache keycachedResponse - boolean removeCacheEntry(String key)
key - The cache key
true if the content was removed.Collection<String> getKeys()
void clearCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||