Class CacheManager
java.lang.Object
com.michelin.cert.redscan.utils.caching.CacheManager
Cache management.
- Author:
- Maxime ESCOURBIAC
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCacheManager default constructor.CacheManager(String applicationName, String cacheManagerUrl) CacheManager constructor. -
Method Summary
-
Field Details
-
applicationName
-
cacheManagerUrl
-
-
Constructor Details
-
CacheManager
public CacheManager()CacheManager default constructor. -
CacheManager
CacheManager constructor.- Parameters:
applicationName- Application Name to avoid conflict in cache.cacheManagerUrl- Cache Manager url (ex: http://127.0.0.1:8080 )
-
-
Method Details
-
buildKey
Generate a unique key for the cache. WARNING : MUST CONTAINS- Parameters:
keyValues- Key values.- Returns:
- Unique key.
-
getCache
Get cache entry.- Parameters:
key- Cache key to retrieve.validity- validity in hours.- Returns:
- The retrieve cache.
-
setCache
Set cache entry.- Parameters:
key- Cache key to retrieve.values- Values to cache.- Returns:
- True if cached.
-