Skip to main content

Python decorators for in-memory LRU caching

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lruheap-1.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lruheap-1.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file lruheap-1.1.0.tar.gz.

File metadata

  • Download URL: lruheap-1.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lruheap-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9d10c9e57bdbaac1ea98f195d801c6ae062e70ceb0c442df4e3f1f42b2035d74
MD5 c78e2002ef50ede9089c3d378daf1727
BLAKE2b-256 092f468a2f9bc50352bb61f408cd6ea59c81f8b6f221f12e002ceba718a230a2

See more details on using hashes here.

File details

Details for the file lruheap-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: lruheap-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lruheap-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 689f1061a7b94cb46a85164bd9eabd96dbe490565c04cb60d99c13a987bfde90
MD5 1736bd649ffd644ef2b22c9a63bad1fb
BLAKE2b-256 d9d2b64e7da66974b4efad096e4483fa63fcf67327a668ec846e59a558c10c0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page