← Questions

Bounded LRU cache in front of a database repository

0
Physical IntelligenceCodingLast asked Sep 2026

A backend service reads records from a database through a repository, and reads are slow. Write, by hand, a cache in front of the repository: repeated reads of a key are served from memory, memory is bounded by evicting the least recently…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 3 credits: each one unlocks a question for good.

Your code and the AI tutor open when you unlock this question.