semvec/pypi-packages huggingface dataset:
lruheap 1.1.0
Python decorators for in-memory LRU caching
License: MIT
Requires Python: >=3.10
Keywords: lru, cache, decorator

# LRU Cache

 ![PyPI - Status](https://img.shields.io/pypi/status/lruheap) [![Downloads](https://pepy.tech/badge/lruheap)](https://pepy.tech/project/lruheap) [![codecov](https://codecov.io/gh/sodrooome/lru-cache/branch/master/graph/badge.svg)](https://codecov.io/gh/sodrooome/lru-cache)

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 :

```sh
pip install lruheap
```

or, with `uv` package manager to faster installation :

```sh
uv pip install lruheap
```

## Documentation

You can read the fully detailed explanation about this package in [here](https://lru-cache.readthedocs.io/en/latest/)

## 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.