Metadata-Version: 2.4
Name: lruheap
Version: 1.1.0
Summary: Python decorators for in-memory LRU caching
Author-email: Ryan Febriansyah <ryanfebriansyah72@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/sodrooome/lru-cache
Project-URL: Repository, https://github.com/sodrooome/lru-cache
Keywords: lru,cache,decorator
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: ruff>=0.3.0; extra == "dev"
Requires-Dist: mypy>=1.8.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Requires-Dist: bandit[toml]>=1.7.0; extra == "dev"
Dynamic: license-file

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