DiskCache.Factory, DiskCache.Writer
Constructor and Description |
---|
DiskCacheAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache.
|
void |
delete(Key key)
Remove the key and value from the cache.
|
File |
get(Key key)
Get the cache for the value at the given key.
|
void |
put(Key key,
DiskCache.Writer writer)
Write to a key in the cache.
|
public File get(Key key)
DiskCache
Note - This is potentially dangerous, someone may write a new value to the file at any point in time and we won't know about it.
public void put(Key key, DiskCache.Writer writer)
DiskCache
DiskCache.Writer
is used so that the cache implementation can
perform actions after the write finishes, like commit (via atomic file rename).public void delete(Key key)
DiskCache