FIG-001/ CACHE-BASICS

set + get with memorycache.

Create a MemoryCache and drive the core set, get, and delete methods against live state.

  • The demo starts with user:1, user:2, and config, then mirrors every operation into the live table.
  • set(key, value) writes a value; get(key) returns the cached value without changing the store.
  • A missing get returns undefined and marks the lookup telemetry plus result row red.
  • Use delete, clear(), and reset to compare one-key removal, an empty cache, and the seeded baseline.
↩ all examples
pattern · basic operations mode · live running source
items · 0
capacity · 10
ops · 0
last · seeded
lookup · idle
set

write or update a key

read without mutating state

result · waiting
key
value
action
cache empty

set a key to populate the in-memory store

store · memory
eviction · lru ready
ttl · none
keys · 0
mode · live
category · cache-basics
sheet · sheet 01 / 01
⟳ to re-run