{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/7"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/3"}],"enrichment":{"capability":"Automatic and manual ORM query caching for Django with Redis-backed storage and granular event-driven cache invalidation tied to model changes.","skillfed_tags":["django-orm","redis-cache","query-optimization"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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\u20135.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."},"id":"django-cacheops","links":{"html":"https://skillfed.io/packages/django-cacheops","md":"https://skillfed.io/packages/django-cacheops.md","pypi":"https://pypi.org/project/django-cacheops/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-04-20","license_spdx":null,"license_treatment":"permissive","name":"django-cacheops","python_support":"supports_current","summary":"A slick ORM cache with automatic granular event-driven invalidation for Django."},"popularity":{"monthly_downloads":1321573,"position":4062,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"7.2"}
