-
Stores data in the cache for the given key. If
toDisk
is set totrue
, the completion handler is called following writing the data to disk, otherwise it is called immediately upon storing the data in the memory cache. -
Returns data from the cache for the given key, if any. The memory cache is consulted first, followed by the disk cache. If data is found on disk which isn’t in memory, it is added to the memory cache.
-
Clears out the memory cache.
-
Clears the disk cache and calls the completion handler when finished.