InMemoryCacheService

A basic CacheService implementation keeping the cached objects in memory.

Constructors

Link copied to clipboard
constructor(context: Context?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun <T : Any> cacheOf(valueType: KClass<T>, namespace: String): Cache<T>

Gets the cache for objects of valueType in the given namespace.

Link copied to clipboard
open override fun close()

Closes any opened file handles, removes temporary files, etc.

Link copied to clipboard
open override fun onTrimMemory(level: MemoryObserver.Level)

Called by the system when memory needs to be freed.