LRU cache
Least Recently Used caching is one of the oldest techniques in computing. When a new item needs to be stored but the cache is at capacity, the item that was accessed furthest back in time is removed. The result is that frequently accessed items stay in the cache, and cold items leave on their own.
Under the hood, an LRU cache tracks the order in which items were last touched. Every read or write moves that item to the front of a recency list; when space is needed, the item at the back, the one untouched longest, is dropped. A well-built implementation does this in constant time with a hash map plus a linked list, so tracking recency adds no real overhead. LRU is one policy among several: LFU evicts the least frequently used, FIFO evicts the oldest written regardless of use, and each suits a different access pattern. LRU wins when recent use predicts near-future use, which is exactly how an editor returns to the same clips across a session.
For video editors, LRU means your cache never manually fills up or stops working. You set a size budget (for example 50 GB), and the system handles the cleanup. Pinned items are excluded from eviction, so critical project files can be protected manually.
What makes LRU ideal here is that eviction is cheap and fully reversible. The proxies on your SSD are disposable copies; the authoritative originals live in cloud storage. So when the cache evicts a proxy you have not touched in weeks, nothing is lost, the moment you reopen that project the proxy is regenerated or the original streamed on demand. That safety net is why an aggressive, automatic cache works for editing: you get the speed of local media without ever babysitting disk space or fearing data loss.
Examples
- •Set a 100 GB cache budget, the oldest unused proxies are removed when you approach the limit
- •Pin the current client project so its proxies never get evicted while you are working on it
- •Trigger a manual cleanup to free space immediately without waiting for automatic eviction
In Sanbila
Sanbila's local SSD cache runs an LRU policy with configurable size from 5 GB to 500 GB. Pinned projects are protected. Originals stay safe in the cloud, so any evicted proxy can be re-streamed on demand.
Frequently asked questions
How is LRU different from other cache eviction policies?+
LRU evicts whatever was used least recently, betting that recent use predicts future use. LFU (least frequently used) instead counts how often each item is touched and keeps the popular ones, while FIFO simply drops the oldest written item regardless of use. For editing, LRU fits best: you keep returning to the clips you touched this session, so recency is a good proxy for what you will need next.
Will LRU delete a proxy I still need?+
Only one you have not touched for a long time, and even then nothing is actually lost. Evicted proxies are just local copies; the original stays safe in the cloud, so reopening the project regenerates the proxy or streams the original on demand. And you can pin a project to exclude its proxies from eviction entirely while you work on it.
How does Sanbila use an LRU cache?+
Sanbila's local SSD cache runs an LRU policy with a size budget you set (from a few GB up to hundreds). When you near the limit, the least recently used unpinned proxies are cleared automatically, and you can also trigger a manual cleanup. Because originals stay in the cloud, any evicted proxy is re-streamed or rebuilt on demand, so the cache stays fast and self-managing.
Related terms
Sources
- Cache replacement policies (LRU) · Wikipedia
- Caching best practices · AWS
- Linux memory management concepts · Linux Kernel docs