com.nostra13.universalimageloader.cache.disc.impl
Class TotalSizeLimitedDiscCache
java.lang.Object
com.nostra13.universalimageloader.cache.disc.BaseDiscCache
com.nostra13.universalimageloader.cache.disc.LimitedDiscCache
com.nostra13.universalimageloader.cache.disc.impl.TotalSizeLimitedDiscCache
- All Implemented Interfaces:
- DiscCacheAware
public class TotalSizeLimitedDiscCache
- extends LimitedDiscCache
Disc cache limited by total cache size. If cache size exceeds specified limit then file with the most oldest last
usage date will be deleted.
- Since:
- 1.0.0
- Author:
- Sergey Tarasevich (nostra13[at]gmail[dot]com)
- See Also:
LimitedDiscCache
Method Summary |
protected int |
getSize(java.io.File file)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TotalSizeLimitedDiscCache
public TotalSizeLimitedDiscCache(java.io.File cacheDir,
int maxCacheSize)
- Parameters:
cacheDir
- Directory for file caching. Important: Specify separate folder for cached files. It's
needed for right cache limit work.maxCacheSize
- Maximum cache directory size (in bytes). If cache size exceeds this limit then file with the
most oldest last usage date will be deleted.
TotalSizeLimitedDiscCache
public TotalSizeLimitedDiscCache(java.io.File cacheDir,
FileNameGenerator fileNameGenerator,
int maxCacheSize)
- Parameters:
cacheDir
- Directory for file caching. Important: Specify separate folder for cached files. It's
needed for right cache limit work.fileNameGenerator
- Name generator for cached filesmaxCacheSize
- Maximum cache directory size (in bytes). If cache size exceeds this limit then file with the
most oldest last usage date will be deleted.
getSize
protected int getSize(java.io.File file)
- Specified by:
getSize
in class LimitedDiscCache
Copyright © 2011-2013. All Rights Reserved.