in-memory cache

A store in the program's memory that keeps recently fetched values so they can be reused without asking the original source again.

In more detail

Each entry usually has an expiry time, or TTL, after which it is refetched. Everything in it is lost when the program restarts.

Example

class MemoryCache<K, V> { private entries = new Map<K, CacheEntry<V>>(); }

Related terms

Taught in

References