-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
The current feature comparison table for intent presets (@cache.minimal, @cache.production, @cache.secure) in the README is incomplete and could be clearer:
Missing presets
The table only covers minimal, production, and secure. The dev and test presets are mentioned in a collapsed <details> block below with code examples but no feature comparison — a reader has to read the source to understand what they enable/disable.
Missing features
Several features that presets actually configure are absent from the table:
| Feature actually configured | In table? |
|---|---|
| Circuit Breaker | ✅ |
| Adaptive Timeouts | ✅ |
| Monitoring (Prometheus/tracing/logging) | ✅ (as "Monitoring") |
| Integrity Checking | ✅ |
| Encryption | ✅ |
| L1 SWR (stale-while-revalidate) | ❌ |
| L1 Invalidation | ❌ |
| L1 Namespace Index | ❌ |
| Backpressure | ❌ |
| Structured Logging | ❌ (collapsed into "Monitoring") |
| Tracing | ❌ (collapsed into "Monitoring") |
Ambiguous descriptions
- "✅ Full" for Monitoring is vague — does it mean Prometheus + tracing + structured logging? The
devpreset enables tracing + structured logging but disables Prometheus, which would be a useful distinction. - "✅ Enabled" vs "✅ Enforced" for Integrity Checking — the distinction matters (
secureforces it non-overridable) but this nuance is easy to miss.
Suggested improvement
A single comprehensive table covering all 5 presets with the full feature set:
| Feature | minimal |
dev |
test |
production |
secure |
|---|---|---|---|---|---|
| Circuit Breaker | - | ✅ | - | ✅ | ✅ |
| Adaptive Timeouts | - | ✅ | - | ✅ | ✅ |
| Backpressure | ✅ | ✅ | - | ✅ | ✅ |
| Integrity Checking | - | ✅ | - | ✅ | ✅ 🔒 |
| Encryption | - | - | - | - | ✅ Required |
| L1 SWR | - | ✅ | - | ✅ | ✅ |
| L1 Invalidation | - | - | - | ✅ | ✅ |
| L1 Namespace Index | - | - | - | ✅ | ✅ |
| Prometheus Metrics | - | - | - | ✅ | ✅ |
| Tracing | - | ✅ | - | ✅ | ✅ |
| Structured Logging | - | ✅ | - | ✅ | ✅ |
| Use Case | High throughput | Debugging | Unit tests | Production | Compliance |
🔒 = non-overridable (security invariant)
This makes the progressive complexity visible at a glance and helps users pick the right preset without reading source code.
Source of truth
All values derived from DecoratorConfig.minimal(), .dev(), .test(), .production(), .secure() class methods in src/cachekit/config/decorator.py.