Package dev.voidframework.cache.engine
Interface CacheEngine
- All Known Implementing Classes:
AbstractCacheEngine,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.
- Since:
- 1.0.0
-
Method Summary
-
Method Details
-
get
Retrieves a value from cache.- Parameters:
cacheKey- The key- Returns:
- The value, otherwise,
null - Since:
- 1.0.0
-
set
Sets a value to the cache.- Parameters:
cacheKey- The keyvalue- The valuetimeToLive- Retention time (in seconds)- Since:
- 1.0.0
-
remove
Removes a value from cache.- Parameters:
cacheKey- The key- Since:
- 1.0.1
-