Interface Cache
-
- All Known Implementing Classes:
DefaultHalResourceCache
public interface Cache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroy cache.Object
get(String id)
Get a resource by id.void
put(String id, Object resource)
Put a resource into the cache.
-
-
-
Method Detail
-
put
void put(String id, Object resource)
Put a resource into the cache.- Parameters:
id
- the id of the resourceresource
- the resource to cache
-
get
Object get(String id)
Get a resource by id.- Parameters:
id
- the id of the resource- Returns:
- the resource or null if non is found or the resource time to live expired
-
destroy
void destroy()
Destroy cache.
-
-