suparnatural-cache / com.suparnatural.core.cache / CacheableContainer

CacheableContainer

data class CacheableContainer

A Container which holds Cacheable objects which can identified by the key derived from Cacheable.cacheKey. The cached object is converted to immutable before caching. So any updates to the same object will cause an error.

Constructors

<init>

CacheableContainer(obj: Cacheable)

A Container which holds Cacheable objects which can identified by the key derived from Cacheable.cacheKey. The cached object is converted to immutable before caching. So any updates to the same object will cause an error.

Properties

key

val key: String

Cache Key for obj

next

var next: CacheableContainer?

A pointer to next cached object. Useful in Cache Registry and book keeping.

obj

val obj: Cacheable

Cacheable object to be cached.

previous

var previous: CacheableContainer?

A pointer to previous cached object. Useful in Cache Registry and book keeping.