by alexanderGugel

alexanderGugel / arc

:see_no_evil: An Adaptive Replacement Cache (ARC) written in Go.

213 Stars 10 Forks Last release: Not found MIT License 33 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Build Status

NEW Looking for an ARC in Javascript? - alexanderGugel/arc-js


An Adaptive Replacement Cache (ARC) written in Go.


This project implements "ARC", a self-tuning, low overhead replacement cache. The goal of this project is to expose an interface compareable to common LRU cache management systems. ARC uses a learning rule to adaptively and continually revise its assumptions about the workload in order to adjust the internal LRU and LFU cache sizes.

This implementation is based on Nimrod Megiddo and Dharmendra S. Modha's "ARC: A SELF-TUNING, LOW OVERHEAD REPLACEMENT CACHE", while definitely useable and thread safe, this is still an experiment and shouldn't be considered production-ready.

| LFU             | LRU     |
                  p (dynamically adjusted by learning rule)

B1 [...] B2 [...]

The cache is implemented using two internal caching systems L1 and L2. The cache size c defines the maximum number of entries stored (excluding ghost entries). Ghost entries are being stored in two "ghost registries" B1 and B1. Ghost entries no longer have a value associated with them.

Ghost entries are being used in order to keep track of expelled pages. They no longer have a value associated with them, but can be promoted into the internal LRU cache.

Frequently requested pages are being promoted into the LFU.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.