For a python library for caching function results, the strongest matches are grantjenks/python-diskcache (This library provides a robust disk-backed caching solution with), tkem/cachetools (This library provides a collection of memoizing decorators and) and django-cache-machine/django-cache-machine (This library provides automatic caching for Django models with). bbangert/beaker and lericson/pylibmc round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “best python caching libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
This project is a disk-backed key-value store and persistent data structure library for Python. It provides a mechanism for persisting mappings, sets, and queues to the local filesystem to bypass memory limitations and cache expensive function results across threads and processes. The system serves as a cross-process synchronization tool, offering distributed locks, semaphores, and barriers to coordinate shared resource access. It implements advanced caching strategies such as probabilistic stampede prevention, sharded data partitioning to increase throughput, and least-recently-used eviction
This library provides a robust disk-backed caching solution with decorator support, TTL expiration, and persistent storage, making it a highly effective tool for managing frequently accessed data in Python applications.
Extensible memoizing collections and decorators
This library provides a collection of memoizing decorators and in-memory caching structures that directly address the need for performance optimization through data caching, though it lacks built-in support for persistent or distributed storage.
Automatic caching and invalidation for Django models through the ORM.
This library provides automatic caching for Django models with support for in-memory and persistent backends, though it is specifically tailored for ORM integration rather than general-purpose application caching.
Cache and Session Library
Beaker is a mature Python library that provides both in-memory and persistent caching along with session management, supporting decorators and TTL expiration for performance optimization.
A Python wrapper around the libmemcached interface from TangentOrg.
This library provides a high-performance Python interface for memcached, offering robust in-memory and distributed caching capabilities with support for TTL expiration.
johnny cache django caching framework
This is a Django-specific caching framework that provides transparent, automated caching for database queries, though it is more specialized than a general-purpose Python caching library.
This library provides a comprehensive caching solution for Python with built-in support for asynchronous operations, decorator-based usage, and multiple backends including in-memory and persistent storage.
Cachier is a Python caching library that provides decorator-based persistent caching with support for TTL expiration and multiple backends, making it a solid choice for improving application performance.
This project is a native Windows port of the Redis in-memory key-value store. It provides a high-speed database that maintains datasets in RAM while using periodic snapshots to disk for data persistence. The implementation includes a background system service wrapper, allowing the data store to be installed as a Windows service that starts automatically upon computer boot. It utilizes native Windows compilation to enable execution directly on the host operating system. The system covers in-memory data caching and local data persistence, ensuring that information is recovered after a process
This repository provides a native Windows port of the Redis server, which acts as a standalone distributed caching service rather than a Python-specific library for integrating caching into your application code.
Reselect is a state management optimization tool and memoization utility designed to minimize redundant calculations and UI re-renders. It functions as a library for creating memoized selectors that derive specific data from a state store. The library implements input-based memoization and recursive selector composition to create a hierarchy of derived data dependencies. It ensures reference-stable result caching and provides custom equality checking to determine when a cache should be invalidated. The project covers capabilities for derived data computation, frontend performance optimizatio
This is a memoization utility for frontend state management rather than a general-purpose Python caching library for application data storage.
Cinder is a high-performance Python runtime implementation based on CPython. It is designed as an execution environment optimized for large-scale distributed systems and cloud environments. The project integrates a distributed memory cache and an asynchronous memory layer to manage data across multiple network nodes. It also provides a native C extension framework for developing high-performance compiled modules that link directly into the interpreter memory space. The system covers capabilities for asynchronous data retrieval, large-scale execution, and the integration of embedded scripting
Cinder is a high-performance Python runtime and execution environment rather than a library designed for application-level caching, making it a foundational tool for infrastructure rather than a developer-facing caching utility.
Memcached is a high-performance, distributed, in-memory key-value storage and request routing engine. It functions as a volatile data store designed to accelerate dynamic applications by caching objects in RAM, thereby reducing backend database load and providing sub-millisecond response times. The system utilizes a specialized architecture that organizes memory into fixed-size slabs to minimize fragmentation and maximize throughput for high-concurrency workloads. The project distinguishes itself through a multi-threaded, lock-friendly design that scales across CPU cores and supports complex
Memcached is a high-performance, distributed memory object caching system, but it is a standalone server application written in C rather than a Python library designed for integration into your application code.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| grantjenks/python-diskcache | 2.8K | Python | other | |
| tkem/cachetools | 2.8K | Python | MIT | |
| django-cache-machine/django-cache-machine | 884 | Python | BSD-3-Clause | |
| bbangert/beaker | 545 | Python | other | |
| lericson/pylibmc | 493 | C | BSD-3-Clause | |
| jmoiron/johnny-cache | 311 | Python | MIT | |
| aio-libs/aiocache | 0 | — | — | — |
| python-cachier/cachier | 0 | — | — | — |
| redis-windows/redis-windows | 3.5K | Batchfile | apache-2.0 | |
| reduxjs/reselect | 19K | TypeScript | MIT |