LRU Cache

PyPI - Status Downloads codecov

Package for tracking store in-data memory using replacement cache algorithm / LRU cache. The Priority of storing or removing the data based on Min-Max heap algorithm or basic priority queue instead using OrderedDict module that provided by Python.

Features

  • Zero dependencies, only implemented with Python without any external libraries
  • Granularity control for TTL expiration and thread safety
  • Cache inspection methods before initialization

Usage

LRUCache only works in Python version 3.10 and above, you can install it with :

pip install lruheap

or, with uv package manager to faster installation :

uv pip install lruheap

Documentation

You can read the fully detailed explanation about this package in here

Contribution

Any contributions are much welcomed, and you can read on contribution page on how to contribute.

License

This package is licensed under the MIT License.


This site uses Just the Docs, a documentation theme for Jekyll.