Package-level declarations

Types

Link copied to clipboard
interface Cache<K, V>

A cache with operations to add, update, retrieve, and remove entries.

Link copied to clipboard
data class CachePolicy

A cache policy that optionally enforces a max size and temporal policy.

Link copied to clipboard
interface CacheSerializer<T>

Abstraction for serialization Implementing classes should be created in their own modules so that consumers may compose their preferred implementations

Link copied to clipboard

Builder for a thread safe Cache that internally manages a MemoryCache. The cache will periodically persist its data to a SnapshotPersistentCache and will enforce the given CachePolicy. Once the Cache is no longer in use its coroutineScope should be cancelled.

Link copied to clipboard

Provides callbacks to trigger when the system enters a particular memory level.

Link copied to clipboard

Responsible for monitoring the system's memory level and executing the corresponding callback on memoryLevelCallbacks as the memory level changes.

Link copied to clipboard

Builder for a SnapshotPersistentCache that persists data to a file.

Link copied to clipboard

A persistent cache that saves data by taking a snapshot of the data in the cache at a point in time. All data is read out of the persistent cache at once.