suparnatural-cache / com.suparnatural.core.cache / DiskStore / <init>

<init>

DiskStore(blocking: Boolean = true, preprocessors: List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>? = null, location: <ERROR CLASS> = FileSystem.contentsDirectory.absolutePath?.byAppending("cache")!!)

A CacheStore which persists Cacheable objects on the disk. By default, the store blocks the calling thread for all its operations which can changed by setting blocking to false.

A new file is created under location per cached object.

Note: Even though DiskStore does not impose any limits on the number of persisted objects, the underlying platform may impose a limit on number of files created by the application in which case the persistence will fail without any recovery.