# 050106 Elysia Cache Tags

> Tag-based cache invalidation for Elysia — 3-level tags (entity/domain/cross) via Redis Sets, cache-aside, invalidation chains, and signed URL caching.

- Skill: `natuleadan/050106-elysia-cache-tags` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add natuleadan/050106-elysia-cache-tags`
- Raw SKILL.md: https://api.skillmd.com/api/skills/natuleadan/050106-elysia-cache-tags/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: natuleadan (https://skillmd.com/u/natuleadan)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/natuleadan/050106-elysia-cache-tags

---


# Elysia Cache Tags

## When to use

When you need fine-grained cache invalidation beyond simple key-based TTL. Tags let you invalidate related cache entries in bulk.

## References

| Topic | File |
|---|---|
| 3-level tag system | `references/tag-levels.md` |
| Cache-aside with tags | `references/remember-with-tags.md` |
| Invalidation chains | `references/invalidation-chains.md` |
| Signed URL caching | `references/signed-url-cache.md` |

## Quick checklist

- [ ] Level 1: entity-specific tag (`cache:tags:{domain}:{entityId}`)
- [ ] Level 2: domain collection tag (`cache:tags:{domain}`)
- [ ] Level 3: cross-domain tag (`cache:tags:cross:{scope}`)
- [ ] Use `setWithTags(key, data, tags, ttl)` when storing cached values
- [ ] Use `invalidateTags([tag1, tag2, ...])` to batch-invalidate
- [ ] Tag sets TTL = 2x value TTL (ensures tags outlive their members)
- [ ] For signed URLs, cache the URL for 3500s (just under the 3600s expiry)

