Package org.javalite.activejdbc.cache
Class EHCacheManager
java.lang.Object
org.javalite.activejdbc.cache.CacheManager
org.javalite.activejdbc.cache.EHCacheManager
Cache implementation based on EHCache 2.
- Author:
- Igor Polevoy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds item to cache.void
doFlush(CacheEvent event)
Returns a cached item.Returns underlying instance of implementation for specific configuration.Methods inherited from class org.javalite.activejdbc.cache.CacheManager
addCacheEventListener, flush, flush, getKey, purgeTableCache, purgeTableCache, removeAllCacheEventListeners, removeCacheEventListener
-
Constructor Details
-
EHCacheManager
public EHCacheManager()
-
-
Method Details
-
getCache
Description copied from class:CacheManager
Returns a cached item. Can return null if not found.- Specified by:
getCache
in classCacheManager
- Parameters:
group
- group of caches - this is a name of a table for which query results are cachedkey
- key of the item.- Returns:
- a cached item. Can return null if not found.
-
addCache
Description copied from class:CacheManager
Adds item to cache.- Specified by:
addCache
in classCacheManager
- Parameters:
group
- group name of cache.key
- key of the item.cache
- cache item to add to cache.
-
doFlush
- Specified by:
doFlush
in classCacheManager
-
getImplementation
Description copied from class:CacheManager
Returns underlying instance of implementation for specific configuration.- Specified by:
getImplementation
in classCacheManager
- Returns:
- actual underlying implementation of cache. The same as configured in
activejdbc.properties
file. For instance:redis.clients.jedis.JedisPool
.
-