caching

Installation
SKILL.md

Caching

Use this skill when endpoints need read-performance improvements and predictable cache behavior.

Workflow

  1. Identify idempotent read endpoints (GET) suitable for caching.
  2. Enable route-level caching with finite TTL.
  3. Add a stable cache-key strategy when request context affects output.
  4. 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"}]
Related skills

More from alti3/litestar-skills

Installs
1
GitHub Stars
5
First Seen
Mar 2, 2026