-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.load.engine.cache.DiskCache.Factory
public class DiskLruCacheFactory implements DiskCache.Factory
Creates an com.mobwith.imgmodule.disklrucache.DiskLruCache based disk cache in the specified disk cache directory.
If you need to make I/O access before returning the cache directory use the constructor variant.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDiskLruCacheFactory.CacheDirectoryGetterInterface called out of UI thread to get the cache folder.
-
Constructor Summary
Constructors Constructor Description DiskLruCacheFactory(String diskCacheFolder, long diskCacheSize)DiskLruCacheFactory(String diskCacheFolder, String diskCacheName, long diskCacheSize)DiskLruCacheFactory(DiskLruCacheFactory.CacheDirectoryGetter cacheDirectoryGetter, long diskCacheSize)When using this constructor getCacheDirectory will be called outof UI thread, allowing to do I/O access without performance impacts.
-
Method Summary
-
-
Constructor Detail
-
DiskLruCacheFactory
DiskLruCacheFactory(String diskCacheFolder, long diskCacheSize)
-
DiskLruCacheFactory
DiskLruCacheFactory(String diskCacheFolder, String diskCacheName, long diskCacheSize)
-
DiskLruCacheFactory
DiskLruCacheFactory(DiskLruCacheFactory.CacheDirectoryGetter cacheDirectoryGetter, long diskCacheSize)
When using this constructor getCacheDirectory will be called outof UI thread, allowing to do I/O access without performance impacts.- Parameters:
cacheDirectoryGetter- Interface called out of UI thread to get the cache folder.diskCacheSize- Desired max bytes size for the LRU disk cache.
-
-
-
-