Class InMemoryCacheProcessor
java.lang.Object
org.frontcache.cache.CacheProcessorBase
org.frontcache.cache.impl.InMemoryCacheProcessor
- All Implemented Interfaces:
CacheProcessor
-
Field Summary
Fields inherited from class CacheProcessorBase
logger, softInvalidationExecutorFields inherited from interface CacheProcessor
CACHE_FOREVER, CACHED_ENTRIES, NO_CACHE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()One tier, in memory, so only the L1 entry count is real.getFromCacheImpl(String url) voidinit(Properties properties) voidpatch()voidpurge()Removes entries whose effective expiration timestamp is in the past.voidputToCacheImpl(String url, WebResponse component) Stores the entry.voidremoveFromCache(String filter) voidRemoves every entry from this node.Methods inherited from class CacheProcessorBase
doSoftInvalidation, getFromCache, processRequest, putToCacheMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CacheProcessor
backup, doSoftInvalidation, getCachedKeys, getFromCache, processRequest, putToCache
-
Constructor Details
-
InMemoryCacheProcessor
public InMemoryCacheProcessor()
-
-
Method Details
-
init
- Specified by:
initin interfaceCacheProcessor- Overrides:
initin classCacheProcessorBase
-
putToCacheImpl
Description copied from class:CacheProcessorBaseStores the entry. Called byCacheProcessorBase.putToCache(String, WebResponse)once the headers that must never be persisted (Set-Cookie in particular) have been removed.- Specified by:
putToCacheImplin classCacheProcessorBase- Parameters:
url- cache keycomponent- response to store - the cache takes ownership of it
-
getFromCacheImpl
- Specified by:
getFromCacheImplin classCacheProcessorBase
-
destroy
public void destroy()- Specified by:
destroyin interfaceCacheProcessor- Overrides:
destroyin classCacheProcessorBase
-
removeFromCache
- Specified by:
removeFromCachein interfaceCacheProcessor
-
removeFromCacheAll
public void removeFromCacheAll()Description copied from interface:CacheProcessorRemoves every entry from this node. There used to be a domain-scoped flavour alongside this one. It only dropped entries stamped with the caller's domain, and replicated entries carry the domain of the edge they came from - so an "invalidate all" at the target edge walked straight past them and they stayed served. With one site per node there is one flavour, and it means what it says.- Specified by:
removeFromCacheAllin interfaceCacheProcessor
-
getCacheStats
One tier, in memory, so only the L1 entry count is real. Evictions are not tracked by this processor and there is no on-disk tier - both stay UNKNOWN rather than being reported as zero, so nobody alerts on a flat line that means "not measured".- Specified by:
getCacheStatsin interfaceCacheProcessor
-
getCacheStatus
- Specified by:
getCacheStatusin interfaceCacheProcessor- Overrides:
getCacheStatusin classCacheProcessorBase
-
getCachedKeys
- Specified by:
getCachedKeysin interfaceCacheProcessor
-
patch
public void patch()- Specified by:
patchin interfaceCacheProcessor
-
purge
public void purge()Removes entries whose effective expiration timestamp is in the past. "Cache forever" entries are never removed.- Specified by:
purgein interfaceCacheProcessor
-