Class CacheOperation

java.lang.Object
es.kukenan.smartfi.microservice.contracts.cache.CacheOperation

@Component @RefreshScope public class CacheOperation extends Object
Operation over cache.
  • Field Details

    • productsCacheName

      @Value("${cache.products}") private String productsCacheName
      cache products established.
    • concurrentMapCacheManager

      @Autowired private org.springframework.cache.CacheManager concurrentMapCacheManager
      CacheManager cacheManager.
  • Constructor Details

    • CacheOperation

      public CacheOperation()
  • Method Details

    • insertEntityReferenceCache

      public void insertEntityReferenceCache(String entityId, String reference, String userId, String productId)
      Insert Cache object.
      Parameters:
      entityId - key of the registry
      reference - value of the registry
      userId - user identifier.
      productId - product identifier.
    • getReferenceCache

      public ReferenceCache getReferenceCache(String entityId)
      Getting Cache reference object.
      Parameters:
      entityId - key of the registry
      Returns:
      cacheReference
    • getProductsCache

      private org.springframework.cache.Cache getProductsCache()
    • getCachedResultsPageDto

      public es.kukenan.smartfi.common.api.dtos.ResultsPageDto getCachedResultsPageDto(String key)
      Getting Cache key object for result page.
      Parameters:
      key - key of the method call
      Returns:
      reult page