Removes key
and its value from the cache.
The key of the value to remove.
Returns true
if the entry was removed successfully, else false
.
Gets the cached value for key
.
The key of the value to get.
Returns the cached value.
Checks if a cached value for key
exists.
The key of the entry to check.
Returns true
if an entry for key
exists, else false
.
Sets value
to key
of the cache.
The key of the value to cache.
The value to cache.
Returns the cache object.
Creates a cache object to store key/value pairs.