@Service(value="blSkuMetadataCacheService") public class SkuMetadataCacheServiceImpl extends Object implements SkuMetadataCacheService
| Modifier and Type | Field and Description | 
|---|---|
| protected int | cacheEntityMetaDataTtl | 
| protected long | lastCacheFlushTime | 
| protected static Map<String,Map<String,FieldMetadata>> | METADATA_CACHE | 
| Constructor and Description | 
|---|
| SkuMetadataCacheServiceImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | addToCache(String cacheKey,
          Map<String,FieldMetadata> metadata) | 
| String | buildCacheKey(String productId)Builds out the cache key to use for the other methods | 
| Map<String,Map<String,FieldMetadata>> | getEntireCache()Not generally used but could be useful in some scenarios if you need to invalidate the entire cache | 
| Map<String,FieldMetadata> | getFromCache(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. | 
@Value(value="${cache.entity.dao.metadata.ttl}")
protected int cacheEntityMetaDataTtl
protected long lastCacheFlushTime
protected static final Map<String,Map<String,FieldMetadata>> METADATA_CACHE
public Map<String,Map<String,FieldMetadata>> getEntireCache()
SkuMetadataCacheServicegetEntireCache in interface SkuMetadataCacheServiceSkuMetadataCacheService.buildCacheKey(String)public boolean useCache()
SkuMetadataCacheServiceuseCache in interface SkuMetadataCacheServicepublic Map<String,FieldMetadata> getFromCache(String cacheKey)
getFromCache in interface SkuMetadataCacheServicepublic boolean addToCache(String cacheKey, Map<String,FieldMetadata> metadata)
addToCache in interface SkuMetadataCacheServicepublic void invalidateFromCache(String cacheKey)
SkuMetadataCacheServiceinvalidateFromCache in interface SkuMetadataCacheServicecacheKey - from SkuMetadataCacheService.buildCacheKey(String)public String buildCacheKey(String productId)
SkuMetadataCacheServicebuildCacheKey in interface SkuMetadataCacheServiceproductId - optional productId, can be nullCopyright © 2020. All rights reserved.