Package lazyj
Class PageCache
java.lang.Object
lazyj.cache.ExpirationCache<String,CachingStructure>
lazyj.PageCache
- All Implemented Interfaces:
lazyj.cache.CacheElement<String,
CachingStructure>
This is the page cache.
- Since:
- 2006-10-04
- Author:
- costing
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
callbackOnExpiry
(String key, CachingStructure cs) Cleanup thread, takes an entry that has expired, removes it from the cache and checks if it deserves a bonus.static void
clear()
Clear all the cache structures (in case of major changes to the templates ...)static CachingStructure
Get the contents generating the key on the fly from the request and the extra modifiersstatic List<CachingStructure>
Get the entrire contents of the cache.static CachingStructure
put
(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier, byte[] vbContent, long lLifetime, String sContentType) Cache some arbitrary contentsMethods inherited from class lazyj.cache.ExpirationCache
get, getKeys, getRefreshTime, getValues, overwrite, put, refresh, remove, size
-
Method Details
-
callbackOnExpiry
Cleanup thread, takes an entry that has expired, removes it from the cache and checks if it deserves a bonus.- Overrides:
callbackOnExpiry
in classlazyj.cache.ExpirationCache<String,
CachingStructure> - Parameters:
key
- key that is removedcs
- value for the key that is removed
-
getCacheContent
Get the entrire contents of the cache.- Returns:
- a List of CachingStructure objects that is the entire contents of the memory cache.
-
get
public static CachingStructure get(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier) Get the contents generating the key on the fly from the request and the extra modifiers- Parameters:
request
-sCacheKeyModifier
-- Returns:
- the structure, if exists, or null
-
clear
public static void clear()Clear all the cache structures (in case of major changes to the templates ...)- Since:
- 1.0.2
-
put
public static CachingStructure put(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier, byte[] vbContent, long lLifetime, String sContentType) Cache some arbitrary contents- Parameters:
request
- incoming requestsCacheKeyModifier
-vbContent
-lLifetime
-sContentType
-- Returns:
- the newly created structure
-