-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.load.engine.cache.DiskCache
public class DiskCacheAdapter implements DiskCache
A simple class that returns null for all gets and ignores all writes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDiskCacheAdapter.FactoryDefault factory for DiskCacheAdapter.
-
Method Summary
-
-
Method Detail
-
get
File get(Key key)
Get the cache for the value at the given key.
Note - This is potentially dangerous, someone may write a new value to the file at any pointin time and we won't know about it.
- Parameters:
key- The key in the cache.
-
put
void put(Key key, DiskCache.Writer writer)
Write to a key in the cache. Writer is used so that the cache implementation canperform actions after the write finishes, like commit (via atomic file rename).
- Parameters:
key- The key to write to.writer- An interface that will write data given an OutputStream for the key.
-
delete
void delete(Key key)
Remove the key and value from the cache.
- Parameters:
key- The key to remove.
-
clear
void clear()
Clear the cache.
-
-
-
-