Skip to content
Back to skills

Symfony Cache

ASecurity

Implement caching with the Symfony Cache component; configure pools, use tags for invalidation, prevent stampede

  • 221 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
developmentgoshellbashrailsperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Symfony Cache?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Symfony Cache
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dev-toolings-symfony-cache/badge)](https://www.skillsdirectory.com/skills/dev-toolings-symfony-cache)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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`

Files in this skill

  • SKILL.md1.1 KB
  • reference.md8.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.