Class CacheImpl

java.lang.Object
com.skava.ratingandreviews.service.impl.CacheImpl

@Service public class CacheImpl extends Object

CLass cacheImpl

Class provides the cache implementation .

Author:
Infosys Equinox
  • 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

      public void save(String cacheName, String cacheKey, Object cacheObject)
      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

      public CollectionDomain getCollection(String cacheName, String cacheKey)
      Get the collection from cache
      Parameters:
      cacheName - The name of the cache
      cacheKey - The key that holds the collection domain
      Returns:
      the instance of CollectionDomain object.
    • getCollectionAttributes

      public List<CollectionAttributeDomain> getCollectionAttributes(String cacheName, String cacheKey)
      Get the collection attributes from Cache
      Parameters:
      cacheName - The name of the cache
      cacheKey - The key that holds the collection attributes
      Returns:
      the instance of list of CollectionAttributeDomain object.