Package com.adobe.aemds.guide.cache.api
Interface CacheStore
-
public interface CacheStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear(java.lang.String key)
Removes the value from the cache associated with the keyvoid
clearAll()
Clears all the entries in the cacheboolean
entryExists(java.lang.Object key)
Returns if a value is associated with the keyCacheObject
get(java.lang.Object key)
Get an object from the cache.CacheObject
put(java.lang.Object key, CacheObject value)
Put an object in the cache with a key that can be used to retrieve the object later.
-
-
-
Method Detail
-
put
CacheObject put(java.lang.Object key, CacheObject value)
Put an object in the cache with a key that can be used to retrieve the object later. If the object already exists it will be replaced- Parameters:
key
- Key against which the value is stored in cachevalue
- value to store in the cache- Returns:
- Object previously associated with the key in the cache
-
get
CacheObject get(java.lang.Object key)
Get an object from the cache. If not present null is returned- Parameters:
key
-- Returns:
-
clearAll
void clearAll()
Clears all the entries in the cache
-
clear
void clear(java.lang.String key)
Removes the value from the cache associated with the key- Parameters:
key
- key associated with the object that has to be removed
-
entryExists
boolean entryExists(java.lang.Object key)
Returns if a value is associated with the key- Parameters:
key
-- Returns:
- true if a value is associated with the key false otherwise
-
-