getInstance

open fun getInstance(): CacheUtils

Return the single CacheUtils instance.

cache directory: /data/data/package/cache/cacheUtils

cache size: unlimited

cache count: unlimited

Return

the single CacheUtils instance

open fun getInstance(cacheName: String): CacheUtils

Return the single CacheUtils instance.

cache directory: /data/data/package/cache/cacheUtils

cache size: unlimited

cache count: unlimited

Return

the single CacheUtils instance

Parameters

cacheName

The name of cache.

open fun getInstance(maxSize: Long, maxCount: Int): CacheUtils

Return the single CacheUtils instance.

cache directory: /data/data/package/cache/cacheUtils

Return

the single CacheUtils instance

Parameters

maxSize

The max size of cache, in bytes.

maxCount

The max count of cache.

open fun getInstance(cacheName: String, maxSize: Long, maxCount: Int): CacheUtils

Return the single CacheUtils instance.

cache directory: /data/data/package/cache/cacheName

Return

the single CacheUtils instance

Parameters

cacheName

The name of cache.

maxSize

The max size of cache, in bytes.

maxCount

The max count of cache.

open fun getInstance(@NonNull() cacheDir: File): CacheUtils

Return the single CacheUtils instance.

cache size: unlimited

cache count: unlimited

Return

the single CacheUtils instance

Parameters

cacheDir

The directory of cache.

open fun getInstance(@NonNull() cacheDir: File, maxSize: Long, maxCount: Int): CacheUtils

Return the single CacheUtils instance.

Return

the single CacheUtils instance

Parameters

cacheDir

The directory of cache.

maxSize

The max size of cache, in bytes.

maxCount

The max count of cache.