$npx skillfedfor your agent

django-cacheops

A slick ORM cache with automatic granular event-driven invalidation for Django.

Worth itPyPI Python ModulesReleased Apr 20251.3M downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_cacheops-7.2-py2.py3-none-any.whl
v7.2 · released 2025-04-20 · Python >=3.7 · 3 runtime deps: django, redis, funcy

Yes. django-cacheops is actively maintained, has no known vulnerabilities, low install friction, and solves a real Django performance problem with a mature API. The permissive BSD license and broad Python/Django version support (3.8+ and Django 3.2–5.2) make it a safe choice. Install it if you have a Django app with database-heavy ORM queries and a Redis instance available; the automatic invalidation model eliminates much of the complexity of manual cache management.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Redis 4.0+ server must be running and accessible; Django 3.2+ and Python 3.8+ required.
  • Low install friction; wheel distribution available.
  • Actively maintained with recent commits and stable production status.

License · maintenance · safety

BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

last release 2025-04-20 (481 days) · last repo commit 2026-04-15 · 2,274 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,321,573 downloads/mo, #4,062 on PyPI

Verify before relying

pip install django-cacheops

# In Django settings.py:
INSTALLED_APPS = ['cacheops', ...]
CACHEOPS_REDIS = 'redis://localhost:6379/1'
CACHEOPS = {'auth.user': {'ops': 'get', 'timeout': 60*15}}

# In code:
from cacheops import cached_as
user = User.objects.get(id=1)  # cached automatically
result = Article.objects.filter(tag=2).cache()
  • Whether dog-pile prevention mechanism and transaction support work as documented in production scenarios.
  • Performance impact of signal binding overhead on models with high write volume.
  • Compatibility with Django ORM features introduced after version 5.2.
Same gist for agents: .md · .json

What it is and what it does

django-cacheops is a Django caching layer that sits between your ORM and Redis to automatically cache querysets and invalidate them when underlying data changes. It supports both automatic caching (configured per-model) and manual caching via `.cache()` method calls, plus decorators for caching function results. The package uses Redis as its primary backend and can fall back to filesystem-based time-invalidated caching for simpler use cases.

The core value is granular, event-driven invalidation: when you save, delete, or update a model instance, cacheops automatically invalidates only the relevant cached queries rather than flushing everything. It also provides decorators to cache any user function or view, template extensions for Django and Jinja2, transparent transaction support, and a dog-pile prevention mechanism to avoid thundering-herd problems when cache entries expire.

Use it for

  • Cache frequently accessed User.objects.get() calls across a Django app to reduce database load on auth queries.
  • Automatically invalidate cached article listings when posts are published, updated, or deleted without manual cache management.
  • Decorate expensive reporting functions with @cached_as(Model) to cache results and invalidate them on model changes.
  • Use .nocache() to disable automatic caching on specific querysets when you need fresh data in particular code paths.
  • Cache count and aggregate operations on large tables separately from fetch operations to optimize pagination.
  • Configure per-model cache timeouts and operations (get, fetch, count, aggregate, exists) to fine-tune what gets cached.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

django-cacheops is actively maintained, has no known vulnerabilities, low install friction, and solves a real Django performance problem with a mature API. The permissive BSD license and broad Python/Django version support (3.8+ and Django 3.2–5.2) make it a safe choice. Install it if you have a Django app with database-heavy ORM queries and a Redis instance available; the automatic invalidation model eliminates much of the complexity of manual cache management.

Install

django-cacheops on PyPI

Before you install

Low install friction; wheel distribution available. Actively maintained with recent commits and stable production status. Requires Redis 4.0+ as a runtime dependency alongside Django 3.2+ and Python 3.8+.

Redis 4.0+ server must be running and accessible; Django 3.2+ and Python 3.8+ required.

License in practice

BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install django-cacheops

# In Django settings.py:
INSTALLED_APPS = ['cacheops', ...]
CACHEOPS_REDIS = 'redis://localhost:6379/1'
CACHEOPS = {'auth.user': {'ops': 'get', 'timeout': 60*15}}

# In code:
from cacheops import cached_as
user = User.objects.get(id=1)  # cached automatically
result = Article.objects.filter(tag=2).cache()

Verify before relying

  • Whether dog-pile prevention mechanism and transaction support work as documented in production scenarios.
  • Performance impact of signal binding overhead on models with high write volume.
  • Compatibility with Django ORM features introduced after version 5.2.

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
djangoredisfuncy
MaintenanceActively maintained 481 days since the last release
Last repo commit
First released
Downloads1,321,573 / month, #4,062 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Evidence: django_cacheops-7.2-py2.py3-none-any.whl

Tags

Capabilities
django orm cachingredis query cacheautomatic cache invalidationdjango queryset cachecache decorator djangoorm cache invalidationdjango performance optimization
Topics
django-ormredis-cachequery-optimization

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 › “redis query cache”

  • django-cacheopsAutomatic and manual ORM query caching for Django with Redis-backed…
  • cashewsAsync cache framework with decorator and direct API support for…
  • langchain-redisIntegrates Redis with LangChain to provide vector storage, semantic…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also django-cachalot · django-redis · django-sql-utils · django-cache-memoize · django-mock-queries · python-redis-cache · django-cache-url · django-redis-sessions · Collectfast · django-perf-rec