java.lang.Object | |
↳ | com.facebook.cache.disk.DiskCacheConfig.Builder |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DiskCacheConfig | build() | ||||||||||
DiskCacheConfig.Builder |
setBaseDirectoryName(String baseDirectoryName)
Sets the name of the directory where the cache will be located.
| ||||||||||
DiskCacheConfig.Builder |
setBaseDirectoryPath(File baseDirectoryPath)
Sets the path to the base directory.
| ||||||||||
DiskCacheConfig.Builder | setBaseDirectoryPathSupplier(Supplier<File> baseDirectoryPathSupplier) | ||||||||||
DiskCacheConfig.Builder |
setCacheErrorLogger(CacheErrorLogger cacheErrorLogger)
The logger that is used to log errors made by the cache.
| ||||||||||
DiskCacheConfig.Builder |
setCacheEventListener(CacheEventListener cacheEventListener)
The listener for cache events.
| ||||||||||
DiskCacheConfig.Builder |
setDiskTrimmableRegistry(DiskTrimmableRegistry diskTrimmableRegistry)
The class that will contain a registry of caches to be trimmed in low disk space conditions.
| ||||||||||
DiskCacheConfig.Builder |
setEntryEvictionComparatorSupplier(EntryEvictionComparatorSupplier supplier)
Provides the logic to determine the eviction order based on entry's access time and size
| ||||||||||
DiskCacheConfig.Builder | setIndexPopulateAtStartupEnabled(boolean indexEnabled) | ||||||||||
DiskCacheConfig.Builder |
setMaxCacheSize(long maxCacheSize)
This is the default maximum size of the cache.
| ||||||||||
DiskCacheConfig.Builder |
setMaxCacheSizeOnLowDiskSpace(long maxCacheSizeOnLowDiskSpace)
This is the maximum size of the cache that is used when the device is low on disk space.
| ||||||||||
DiskCacheConfig.Builder |
setMaxCacheSizeOnVeryLowDiskSpace(long maxCacheSizeOnVeryLowDiskSpace)
This is the maximum size of the cache when the device is extremely low on disk space.
| ||||||||||
DiskCacheConfig.Builder |
setVersion(int version)
Sets the version.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Sets the name of the directory where the cache will be located.
Sets the path to the base directory.
A directory with the given base directory name (see setBaseDirectoryName
) will be
appended to this path.
The logger that is used to log errors made by the cache.
The listener for cache events.
The class that will contain a registry of caches to be trimmed in low disk space conditions.
Provides the logic to determine the eviction order based on entry's access time and size
This is the default maximum size of the cache.
This is the maximum size of the cache that is used when the device is low on disk space.
See trimToMinimum()
.
This is the maximum size of the cache when the device is extremely low on disk space.
See trimToNothing()
.
Sets the version.
The cache lives in a subdirectory identified by this version.