Liking cljdoc? Tell your friends :D

Caching Layer — Eviction Policies

Configurable cache eviction strategies for the caching layer (Layer 8).

The caching layer stores query results behind a lock-free concurrent map and evicts entries according to a pluggable policy. Each document here describes one policy: its eviction criterion, the metadata it tracks, and the access patterns it serves best. For the layer overview and integration, see the caching layer index.

Policies

DocumentPurpose
lru.mdLRU (Least Recently Used) — evicts the least recently accessed entry; exploits temporal locality.
lfu.mdLFU (Least Frequently Used) — evicts the entry with the fewest accesses; frequency-based.
ttl.mdTTL (Time-to-Live) — evicts entries after a fixed expiry duration.
age.mdAge (FIFO) — evicts the oldest-inserted entry regardless of access.
cost-aware.mdCostAware — weights eviction by entry size / recomputation cost.
memory-pressure.mdMemoryPressure — evicts in response to system memory pressure signals.

Status: Living reference.

← Documentation Index

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close