Published June 7, 2026 | Version v1

Comparative Evaluation Of Cache Replacement Algorithms For Time-Bounded Stale-Tolerant Data Workloads

Description

Caches in modern web and database systems often hold data that has a built-in shelf life: expired user sessions, abandoned shopping carts, archived transaction records, and historical log entries. Most cache replacement studies treat these workloads the same way they treat hot file pages or virtual memory frames, even though their access patterns and the consequences of returning stale data are quite different. This paper compares seven cache replacement strategies (LRU, LFU, FIFO, MRU, LIFO, CLOCK, and ARC) under workloads that explicitly model stale-tolerant data with per-record TTLs. The benchmark is implemented in Python with PostgreSQL as the source of truth and Redis as the in-memory cache. Eviction is performed in Python rather than delegated to Redis, so the comparison is not biased by the cache server's own policy. Across four workload patterns drawn from observed access skew, temporal locality, and phase shifts, ARC achieved the highest mean hit ratio at every cache size we tested, with LRU and CLOCK close behind. LFU performed poorly when the hot set rotated, and MRU was consistently the weakest. Adding a short uniform TTL override eliminated the rate of stale items served at the cost of a meaningful drop in hit ratio. The trade-off is workload-dependent and offers a knob that operators can tune rather than a single right answer.

Files

48-Nilen Patel.pdf

Files (652.1 kB)

Name Size
md5:aecd4f671c3db901ec498ce77e098abb
652.1 kB Preview Download