repoze-lru
A tiny LRU cache implementation and decorator
Decision gist · record as of 2026-08-14
Yes. This is a mature, dependency-free caching utility with active maintenance, permissive licensing, and no known vulnerabilities. Install it if you need a simple, lightweight LRU cache without the overhead of external dependencies or more complex caching frameworks. It is particularly suited to WSGI and web applications.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction install with no runtime dependencies.
- Actively maintained, last release within 90 days, repository not archived, and supports current Python versions.
License · maintenance · safety
LicenseRef-Repoze-BSD-derived (permissive) — Licensed under a permissive Repoze BSD-derived license, allowing use in most projects without significant legal constraints.
last release 2026-05-16 (90 days) · last repo commit 2026-05-16 · 105 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,200,599 downloads/mo, #2,705 on PyPI
Alternatives
Verify before relying
pip install repoze-lru
from repoze.lru import lru_cache
@lru_cache()
def cached_function(x):
return x * 2- Whether the cache is thread-safe for concurrent access patterns.
- Performance characteristics compared to standard library alternatives.
- Memory overhead per cached entry and eviction behavior under load.
- Specific maxsize parameter defaults and tuning guidance.
What it is and what it does
repoze.lru is a standalone LRU cache implementation designed to automatically manage memory by evicting the least recently used entries when the cache reaches its size limit. It provides both a decorator and a direct cache class interface, making it suitable for caching expensive function results or storing frequently accessed data.
The package has been maintained since 2009 and is classified as mature. It carries no runtime dependencies, making it lightweight and easy to integrate into existing projects. The implementation supports modern Python versions and is actively maintained, with recent updates confirming ongoing compatibility.
Use it for
- Decorate expensive database query functions to avoid repeated lookups with the same parameters.
- Cache API responses in web applications to reduce external service calls.
- Store computed results in data processing pipelines to speed up repeated calculations.
- Implement session or token caching in WSGI middleware applications.
- Reduce memory usage in long-running processes by automatically evicting stale cached data.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a mature, dependency-free caching utility with active maintenance, permissive licensing, and no known vulnerabilities. Install it if you need a simple, lightweight LRU cache without the overhead of external dependencies or more complex caching frameworks. It is particularly suited to WSGI and web applications.
Install
repoze-lru on PyPI
Before you install
Low friction install with no runtime dependencies. Actively maintained, last release within 90 days, repository not archived, and supports current Python versions.
Requires Python 3.10 or later.
License in practice
Licensed under a permissive Repoze BSD-derived license, allowing use in most projects without significant legal constraints.
Quickstart
pip install repoze-lru
from repoze.lru import lru_cache
@lru_cache()
def cached_function(x):
return x * 2
Verify before relying
- Whether the cache is thread-safe for concurrent access patterns.
- Performance characteristics compared to standard library alternatives.
- Memory overhead per cached entry and eviction behavior under load.
- Specific maxsize parameter defaults and tuning guidance.
Package facts
| License | LicenseRef-Repoze-BSD-derived permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 90 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,200,599 / month, #2,705 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: WSGITopic :: Internet :: WWW/HTTP :: WSGI :: Middleware |
Evidence: repoze_lru-0.8-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lru cache python”
- repoze-lruA lightweight LRU (least recently used) cache implementation that…
- lru-dictA fast C-based LRU (Least Recently Used) dict container that evicts…
- pylruProvides a pure-Python LRU (least recently used) cache with…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also cachey · lru-dict · pylru · repoze.who · repoze-sendmail · backports.functools-lru-cache · theine · cacheout · cachetools · onecache