advanced-alchemy-caching
Installation
SKILL.md
Caching
Execution Workflow
- Identify deterministic read paths in repositories or services before adding any caching layer.
- Keep query filters and loader options stable so identical reads stay cacheable.
- For custom SQLAlchemy types, ensure constructor state is hashable and safe for statement caching.
- Use framework-level response caching only for read paths with explicit freshness and invalidation expectations.
- Revisit write paths so updates invalidate, bypass, or tolerate stale cached reads.
Implementation Rules
- Treat caches as derived data, never as the source of truth.
- Avoid caching reads that depend on implicit session state or nondeterministic defaults.
- Do not enable cacheable custom types unless their public constructor state is stable and hashable.
- Separate SQLAlchemy statement caching concerns from HTTP response caching concerns.