sdm-restorating/django-cacheops
59.0
Adequate · 10 November 2026
1.8k
lines of production code
Python
with Lua
9
measurements over time
What this system is
This system is a Django caching library that manages data caching and invalidation via Redis. It provides core caching, locking, and transaction support, along with template tags for fragment caching. The library includes management commands for cache cleanup and invalidation, supported by a comprehensive test suite and benchmarking infrastructure.
Features
Introduce CacheopsLibrary and invalidate\_fragment template tag
The cacheops template tags are now implemented via a new CacheopsLibrary class, which provides a decorator\_tag method to register template tags. This change introduces the invalidate\_fragment function, allowing users to invalidate specific cache fragments by name. The implementation uses Python's inspect.getfullargspec for argument parsing and leverages Django's template parsing utilities to handle template content and arguments.
cacheops/templatetags · high confidence
Architecture
Refactored cacheops internals to use Django AppConfig and modularize Redis operations
The cacheops package was restructured to use a Django AppConfig (apps.py) for initialization, replacing previous monkey-patching of Django's app registry. The codebase was split into distinct modules: getset.py handles core caching and locking logic, redis.py manages the Redis client and Lua scripts, transaction.py manages transaction states, and invalidation.py handles cache invalidation. This refactoring improves thread safety, separates concerns, and modernizes the integration with Django's application lifecycle.
cacheops · high confidence
Behavioural changes
Release django-cacheops 7.0.1
This release fixes compatibility with Redis 6.x and older, improves handling of abstract models, and includes documentation updates. The package is now version 7.0.1, with setup.py and CHANGELOG updated to reflect this version.
(repo-wide) · high confidence
Rewrote cache invalidation and storage logic in Lua
The cacheops library replaced its previous caching and invalidation scripts with new Lua implementations (cache\_thing, cache\_thing\_insideout, invalidate, and invalidate\_insideout). These changes introduce an 'insideout' caching mode that uses stamp-based invalidation to detect stale data, support cache key prefixes, and handle Redis versions 4.0 and above (including Redis 6.x and 7.x) with optimized deletion using 'unlink' and chunked operations for large invalidation sets.
cacheops/lua · medium confidence
Updated cache invalidation and cleanup management commands
The \invalidate\ management command now supports invalidating auto-created models and uses Django's modern \apps\ registry instead of deprecated APIs, while the \cleanfilecache\ and \reapconjs\ commands have been added to clean stale file cache and expired conjunction keys respectively.
cacheops/management · medium confidence
Test coverage
Added comprehensive test suite and benchmarking infrastructure
The project now includes a full test suite and benchmarking framework to validate caching, invalidation, and transaction support. This includes model definitions and fixtures for testing, a benchmarking script (bench.py) for performance measurement, and specific test files (tests.py, test\_extras.py, tests\_sharding.py, tests\_transactions.py) that cover features like cache signals, locking, no-invalidation contexts, database sharding prefixes, and atomic transaction handling.
tests · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 60 → 59 (-1.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.0)
- Architecture 99 → 99 (-0.4)
- Maturity 38 → 38 (+0.0)
- Readiness 61 → 61 (+0.0)
- Security 90 → 83 (-6.9)
- Domain Modelling 100 → 100 (+0.0)
Resolved (1)
- Signature mismatch for caching control: QuerySetMixin.cache() accepts explicit configuration arguments (ops, timeout, lock), while ManagerMixin.cache() takes no arguments. This implies ManagerMixin.cache() uses defaults or global settings, whereas QuerySetMixin allows fine-grained control. This inconsistency can confuse users about whether they can pass parameters to the manager's cache method.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sdm-restorating/django-cacheops was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 10 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit ff7e86c168a62def7f95be8199c4a43281a6cf32 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.4+preprod-464a0040a931.