Package org.frankframework.http.rest
Interface IApiCache
- All Known Implementing Classes:
ApiEhcache
,ApiMemcached
public interface IApiCache
Etag (key-value) Cache interface, allows
RestListeners
and ApiListeners
to save and retrieve etags.- Since:
- 7.0-B2
- Author:
- Niels Meijer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all items in the cache.boolean
containsKey
(String key) Checks whether or not an object has previously been stored in the cachevoid
destroy()
Closes the cache.Retrieve an object from the cachevoid
Place an object in the cachevoid
Place an object in the cacheboolean
Remove an object from the cache
-
Method Details
-
get
Retrieve an object from the cache- Parameters:
key
- name of the object to fetch- Returns:
- null or value of the stored object
-
put
Place an object in the cache- Parameters:
key
- name of the object to storevalue
- value of the object
-
put
Place an object in the cache- Parameters:
key
- name of the object to storevalue
- value of the objectttl
- time to live, when the object expires
-
remove
Remove an object from the cache- Parameters:
key
- name of the object to remove- Returns:
- returns true when successfully removed the object
-
containsKey
Checks whether or not an object has previously been stored in the cache- Parameters:
key
- name of the object to find- Returns:
- true when found
-
clear
void clear()Removes all items in the cache. -
destroy
void destroy()Closes the cache.
-