Interface SkuMetadataCacheService
- All Known Implementing Classes:
SkuMetadataCacheServiceImpl
public interface SkuMetadataCacheService
- Author:
- Jerry Ocanas (jocanas)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addToCache
(String cacheKey, Map<String, FieldMetadata> metadata) buildCacheKey
(String productId) Builds out the cache key to use for the other methodsNot generally used but could be useful in some scenarios if you need to invalidate the entire cachegetFromCache
(String cacheKey) void
invalidateFromCache
(String cacheKey) Allows for outside sources to invalidate entries from the Sku Metadata cache that is being used during sku inspects.boolean
useCache()
Whether or not to use the cache.
-
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, getEntireCache()FieldMetadata>> 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
Builds out the cache key to use for the other methods- Parameters:
productId
- optional productId, can be null- Returns:
-
getFromCache
-
addToCache
-
invalidateFromCache
Allows for outside sources to invalidate entries from the Sku Metadata cache that is being used during sku inspects.- Parameters:
cacheKey
- frombuildCacheKey(String)
-