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.2.0.tar.gz (10.6 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.2.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lruheap-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f92134ec4a4c3f93c4538988395e3dcfbeeb3f69dc05b88de4e04889cd7f3da9
MD5 73c7c4f6eba7a34fb0910674945cd371
BLAKE2b-256 d69101a6a8594d2fe204b7d8fce2af4b1a49e7fc76d04d46972b9648c3f8cee4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lruheap-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a97f79101c0fa1132cb4bd5360acd20b128b459025f4790e263a538cf0e2d5
MD5 218e68e474b180fe35cb11067076ce5c
BLAKE2b-256 01438ef2275653d9360050c2b0cc227a3fec175d7615d0e64ec038ad1763a11e

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