BigMemory 4.4.0 | Product Documentation | BigMemory Max Developer Guide | Cache Decorators | Built-in Decorators
 
Built-in Decorators
BlockingCache
This is a Blocking decorator for Ehcache that allows concurrent read access to elements already in the cache. If the element is null, other reads will block until an element with the same key is put into the cache. This decorator is useful for constructing read-through or self-populating caches. BlockingCache is used by CachingFilter.
SelfPopulatingCache
A self-populating decorator for Ehcache that creates entries on demand. Clients of the cache simply call it without needing knowledge of whether the entry exists in the cache. If null, the entry is created. The cache is designed to be refreshed. Refreshes operate on the backing cache, and do not degrade performance of get calls.
SelfPopulatingCache extends BlockingCache. Multiple threads attempting to access a null element will block until the first thread completes. If refresh is being called the threads do not block - they return the stale data. This is very useful for engineering highly scalable systems.
Caches with Exception Handling
Caches with exception handlers are decorated. For information about adding an exception handler to a cache, see Cache Exception Handlers.