Skip to content

Add caching strategy skill #38

Description

@PAMulligan

Description

Create a new skill that generates caching middleware and strategies for Nerva APIs. This complements the existing `api-performance` skill with dedicated caching patterns.

Why

The `api-performance` skill mentions caching but doesn't provide a dedicated, comprehensive caching implementation. A caching skill would generate middleware for in-memory caching, Redis, and Cloudflare KV with proper cache invalidation patterns.

Acceptance Criteria

  • Create `.claude/skills/caching-strategy/SKILL.md`
  • Cover caching strategies:
    • In-memory caching (Map-based, for single-instance Node.js)
    • Redis caching (for multi-instance Node.js)
    • Cloudflare KV caching (for Workers)
    • HTTP cache headers (Cache-Control, Vary)
  • Generate Hono middleware that:
    • Caches GET responses by URL + query params
    • Supports TTL configuration per route
    • Handles cache invalidation on mutations (POST/PUT/DELETE)
    • Adds `X-Cache: HIT/MISS` response header
  • Include cache key generation patterns
  • Add stale-while-revalidate pattern
  • Update `pipeline.config.json` with caching configuration section
  • CI passes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions