public interface DiskCache
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DiskCache
An interface for lazily creating a disk cache.
|
static interface |
DiskCache
An interface to actually write data to a key in the disk cache.
|
Fileget(Key key)
Note - This is potentially dangerous, someone may write a new value to the file at any point in timeand we won't know about it.
key - The key in the cache.
void put(Keykey, DiskCache .Writer writer)
DiskCache.Writer is used so that the cache implementation can perform actions after the write finishes, like commit (via atomic file rename).
key - The key to write to.
writer - An interface that will write data given an OutputStream for the key.
void delete(Keykey)
key - The key to remove.
void clear()