Interface SkuMetadataCacheService

All Known Implementing Classes:
SkuMetadataCacheServiceImpl

public interface SkuMetadataCacheService
Author:
Jerry Ocanas (jocanas)
  • Method Details

    • useCache

      boolean useCache()
      Whether or not to use the cache. If they cache is configured to be used but is past the metadata TTL, the cache is cleared out from this method
    • getEntireCache

      Map<String,Map<String,FieldMetadata>> getEntireCache()
      Not generally used but could be useful in some scenarios if you need to invalidate the entire cache
      Returns:
      the cache, keyed by buildCacheKey(String)
    • buildCacheKey

      String buildCacheKey(String productId)
      Builds out the cache key to use for the other methods
      Parameters:
      productId - optional productId, can be null
      Returns:
    • getFromCache

      Map<String,FieldMetadata> getFromCache(String cacheKey)
    • addToCache

      boolean addToCache(String cacheKey, Map<String,FieldMetadata> metadata)
    • invalidateFromCache

      void invalidateFromCache(String cacheKey)
      Allows for outside sources to invalidate entries from the Sku Metadata cache that is being used during sku inspects.
      Parameters:
      cacheKey - from buildCacheKey(String)