Skip to main content
skill CX Codex

symfony-cache — Claude Code skill for Symfony caching

Configure Symfony Cache pools, entry expiry, and tag-based invalidation with this skill. It helps when caching costly reads or preventing a burst of recomputations after a key expires.

MIT ★ 234 updated 2026-10-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dev-toolings/superpowers-symfony --skill symfony-cache -a claude-code
Open on GitHub

What symfony-cache does

The skill guides pool and adapter choices based on access patterns and deployment setup, then uses CacheInterface::get() with an explicit expiry. Its use cases include repository results, computed values, and responses from third-party services. Entries without an expiry remain in the pool indefinitely.

For invalidation, the skill maps tags to cached data and clears the relevant tags after writes instead of flushing the whole pool. Tag invalidation requires a tag-aware adapter, so the pool configuration must account for it. It also covers early expiration for expensive recomputations. Cached values can be stale, so data that must be exact should stay out of the cache.

Install it for Claude Code with npx skills add dev-toolings/superpowers-symfony --skill symfony-cache -a claude-code; the skill file is at ~/.claude/skills/symfony-cache/SKILL.md. Do not put secrets or unhashed user input in cache keys.

What it helps with

  • choose a Symfony Cache pool and adapter for a data access pattern
  • set an expiry for each cached entry
  • invalidate related entries by tag after a write
  • avoid concurrent recomputation when an expensive key expires

Example prompts for the agent

  • Set up Symfony Cache for these repository results and choose an expiry for each entry.
  • Tag these cached values and map each write to the tags it should invalidate.
  • Protect this expensive recomputation from simultaneous requests after the cache expires.

How to install symfony-cache

1Skills CLI (Vercel)

npx skills add dev-toolings/superpowers-symfony --skill symfony-cache -a claude-code

2Manually: put the files in place

~/.claude/skills/symfony-cache/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/symfony-cache/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about symfony-cache

How do I install symfony-cache in Claude Code?

Run npx skills add dev-toolings/superpowers-symfony --skill symfony-cache -a claude-code. The skill file is at ~/.claude/skills/symfony-cache/SKILL.md.

What does symfony-cache do?

It guides Symfony Cache setup, including pools and adapters, entry expiry, tag-based invalidation, and protection against simultaneous recomputation of expensive values.

What is required for tag invalidation?

Use a tag-aware adapter when configuring the pool. The skill recommends mapping tags to the data behind each entry and invalidating the relevant tags after writes.

Source text

SKILL.md · MIT
---
name: symfony-cache
description: Implement caching with the Symfony Cache component; configure pools, use tags for invalidation, prevent stampede
capabilities: [read, search, edit, shell]
tags: [architecture, cache, performance]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
  - Write
  - Edit
  - Bash
---
# Symfony Cache (Symfony)

## Use when
- Caching expensive reads: repository results, computed values, third-party responses.
- Choosing or configuring a pool and its adapter (filesystem, Redis, APCu, chained).
- Invalidating by tag rather than clearing everything.
- A hot key expires under load and every request recomputes it at once.
- Adding HTTP cache headers, a cache warmer, or clearing pools on deploy.

## Default workflow
1. Identify what is recomputed and how often, and whether it can go stale.
2. Pick the pool and adapter for the access pattern and the deployment shape.
3. Read through `CacheInterface::get()` with an explicit expiry.
4. Tag every entry by the data it derives from, and invalidate by tag on write.
5. Enable early expiration on keys whose recomputation is expensive.

## Guardrails
- Set an expiry on every entry. An entry without one never leaves the pool.
- Never put user input in a cache key unhashed, and never put secrets in one.
- Invalidate by tag, not by clearing the pool: a full clear is a cold start.
- A cached value is stale by definition. Do not cache what must be exact.
- Tag invalidation needs a tag-aware adapter, so decide it when configuring the pool.

## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.

## Output contract
- Pool and adapter configuration, with the expiry chosen for each entry.
- The tag map: which write invalidates which tags.
- Stampede protection where recomputation is expensive.
- Evidence that a write invalidates what it should.

## References
- `reference.md`

© dev-toolings · MIT · dev-toolings/superpowers-symfony

Similar skills

All skills for Backend and APIs →

From the same set51

The whole set →
form-types-validation form-types-validation generates Symfony form types, configures DTO validation groups, handles HTTP 422 responses, and sets up multi-step flows. CX Codex +1 ★ 234repo stars tdd-with-phpunit The tdd-with-phpunit skill guides PHPUnit-driven work on Symfony features, from checking a failing test to refactoring after it passes. Use it for command, form, and external-service tests. CX Codex +1 ★ 234repo stars using-symfony-superpowers using-symfony-superpowers is a Claude Code skill that detects the Symfony version, selects a skill, and sequences steps for complex tasks. CX Codex +1 ★ 234repo stars interfaces-and-autowiring interfaces-and-autowiring guides Symfony dependency injection in Claude Code by binding interfaces, configuring #[Target] aliases, and decorating services cleanly. CX Codex +1 ★ 234repo stars test-doubles-mocking test-doubles-mocking — a skill for creating test doubles with PHPUnit mocks in Symfony, used to replace slow or external dependencies, verify method calls, and write simplified repository fakes in isolated unit tests. CX Codex +1 ★ 234repo stars rate-limiting rate-limiting guides Claude Code through setting up Symfony RateLimiter policies, controller attributes, and 429 responses with Retry-After headers. CX Codex +1 ★ 234repo stars api-platform-tests The api-platform-tests skill guides functional tests for Symfony API Platform resources, including response checks, filters, JSON schemas, and access control. Use it while building or changing API endpoints. CX Codex +1 ★ 234repo stars api-platform-serialization Skill configures API Platform serialization: field groups per operation, IRIs instead of nested objects, computed properties, and normalizer options. CX Codex +1 ★ 234repo stars

Project sponsors

Companies that keep this analytics open