suparnatural-cache / com.suparnatural.core.cache / CacheStoreWorker / persistObject

persistObject

abstract fun <T : Cacheable> persistObject(input: <ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>, task: (<ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>) -> Unit): Unit

Invokes a strictly non-capturing lambda task with the input as an argument to persist T. The task must not access any state other than its arguments including any immutable of frozen objects to guarantee thread safety.

Parameters

T - the type of object being persisted