FA-264 / Runtime and resources / Member archive
A cache evicts the entry it most recently served · case 04
Insertion order is mistaken for recency, or updating an existing value fails to refresh that recency.
Case contract
Events are ['put',key,value] or ['get',key]; keys are strings and capacity is nonnegative. A get returns value or None, and only hits refresh recency. Every put refreshes its key. Capacity zero retains nothing. Return [read results,keys ordered least to most recent].
Why this case matters
Models cache bookkeeping independently of expiration or concurrent locking, covering the difference between recency after a read and recency after replacing an existing value.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| hit moves oldest before eviction | [[4], ["k1", "k2", "k3", "k4", "new"]] | [[4], ["k2", "k3", "k4", "k0", "new"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗