DiskCache

interface DiskCache

An LRU cache of files.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
interface Editor

Edits the values for an entry.

Link copied to clipboard

A snapshot of the values for an entry.

Properties

Link copied to clipboard
abstract val directory: Path

The directory that contains the cache's files.

Link copied to clipboard
abstract val fileSystem: FileSystem

The file system that contains the cache's files.

Link copied to clipboard
abstract val maxSize: Long

The maximum size of the cache in bytes.

Link copied to clipboard
abstract val size: Long

The current size of the cache in bytes.

Functions

Link copied to clipboard
abstract fun clear()

Delete all entries in the disk cache.

Link copied to clipboard
abstract fun openEditor(key: String): DiskCache.Editor?

Write to the entry associated with key.

Link copied to clipboard

Read the entry associated with key.

Link copied to clipboard
abstract fun remove(key: String): Boolean

Delete the entry referenced by key.

Link copied to clipboard
abstract fun shutdown()

Close any open snapshots, abort all in-progress edits, and close any open system resources.