Package dev.voidframework.cache.engine
Interface CacheEngine
- All Known Implementing Classes:
BlackHoleCacheEngine,MemoryCacheEngine
public interface CacheEngine
The cache engine is responsible for adding, retrieving and managing the lifetime of cached items.
All cache engine implementation must implements this interface.
-
Method Summary
-
Method Details
-
get
Retrieves a value from cache.- Parameters:
cacheKey- The key- Returns:
- The value, otherwise,
null
-
set
Set a value to the cache.- Parameters:
cacheKey- The keyvalue- The valuetimeToLive- Retention time (in seconds)
-