DiskCache

interface DiskCache

An LRU cache of files.

Types

Builder
Link copied to clipboard
class Builder
Editor
Link copied to clipboard
interface Editor
Edits the values for an entry.
Snapshot
Link copied to clipboard
interface Snapshot
A snapshot of the values for an entry.

Functions

clear
Link copied to clipboard
abstract fun clear()
Delete all entries in the disk cache.
edit
Link copied to clipboard
abstract fun edit(key: String): DiskCache.Editor?
Edit the entry associated with key.
get
Link copied to clipboard
abstract operator fun get(key: String): DiskCache.Snapshot?
Get the entry associated with key.
remove
Link copied to clipboard
abstract fun remove(key: String): Boolean
Delete the entry referenced by key.

Properties

directory
Link copied to clipboard
abstract val directory: Path
The directory where the cache stores its data.
fileSystem
Link copied to clipboard
abstract val fileSystem: FileSystem
The file system that contains the cache's files.
maxSize
Link copied to clipboard
abstract val maxSize: Long
The maximum size of the cache in bytes.
size
Link copied to clipboard
abstract val size: Long
The current size of the cache in bytes.