Class CacheImpl
java.lang.Object
com.skava.ratingandreviews.service.impl.CacheImpl
CLass cacheImpl
Class provides the cache implementation .
- Author:
- Infosys Equinox
-
Constructor Summary
ConstructorsConstructorDescriptionCacheImpl
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.skava.core.properties.CacheProperties cacheProperties) -
Method Summary
Modifier and TypeMethodDescriptiongetCollection
(String cacheName, String cacheKey) Get the collection from cachegetCollectionAttributes
(String cacheName, String cacheKey) Get the collection attributes from Cachevoid
This method saves the input object to the cache using the provided cache name and cache key.void
setCacheManager
(org.springframework.cache.CacheManager cacheManager)
-
Constructor Details
-
CacheImpl
@Autowired public CacheImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.skava.core.properties.CacheProperties cacheProperties)
-
-
Method Details
-
setCacheManager
@Autowired(required=false) public void setCacheManager(org.springframework.cache.CacheManager cacheManager) - Parameters:
cacheManager
- the cacheManager to set
-
save
This method saves the input object to the cache using the provided cache name and cache key.- Parameters:
cacheName
- The name of the cache.cacheKey
- The key that holds the cache object.cacheObject
- The object that needs to be saved to the cache.
-
getCollection
Get the collection from cache- Parameters:
cacheName
- The name of the cachecacheKey
- The key that holds the collection domain- Returns:
- the instance of
CollectionDomain
object.
-
getCollectionAttributes
Get the collection attributes from Cache- Parameters:
cacheName
- The name of the cachecacheKey
- The key that holds the collection attributes- Returns:
- the instance of list of
CollectionAttributeDomain
object.
-