suparnatural-cache / com.suparnatural.core.cache / CacheStore / flushAndClose

flushAndClose

abstract fun flushAndClose(): <ERROR CLASS><Unit>

Close all the handles to the resources by flushing any scheduled tasks. This method should be used in conjunction when blocking is set to true. The store implementation is expected to guarantee that calling this method will not result in any loss and that all resources will be freed only after the schedules tasks are completed.

For example, call this on DiskStore to close any file handles and terminate the worker.