caching
SKILL.md
Caching
Use this skill when endpoints need read-performance improvements and predictable cache behavior.
Workflow
- Identify idempotent read endpoints (
GET) suitable for caching. - Enable route-level caching with finite TTL.
- Add a stable cache-key strategy when request context affects output.
- Verify invalidation expectations against write endpoints.
Core Pattern
from litestar import get
@get("/articles", cache=60)
async def list_articles() -> list[dict[str, str]]:
return [{"title": "example"}]
Strategy Notes
- Cache only safe, deterministic responses.
- Include tenant/user/locale dimensions in key building when applicable.
- Keep TTL short for frequently changing resources.
- Do not cache authenticated responses unless keying is strict and intentional.
Litestar References
Weekly Installs
1
Repository
alti3/litestar-skillsGitHub Stars
5
First Seen
14 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1