# Commandkit Cache

> Implement deterministic caching with @commandkit/cache. Use for 'use cache' directives, cacheTag/cacheLife strategy, revalidateTag invalidation, and provider setup for memory or Redis deployments.

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

---


# CommandKit Cache Plugin

## Activation guidance

Use for read-heavy deterministic workloads and explicit invalidation
design.

## Required filesystem expectations

- plugin registration in `commandkit.config.ts`
- cacheable functions in commands/services/helpers
- optional provider bootstrap module for Redis setup

## Execution workflow

1. Register `cache()` plugin.
2. Add `'use cache'` to deterministic async functions.
3. Design tags and TTLs with clear resource boundaries.
4. Pair writes with `revalidateTag`.
5. Choose memory vs Redis based on deployment topology.

## Guardrails

- Do not cache mutation paths.
- Do not cache sensitive user-specific results without strict key
  design.

## Reference index

| Name                                    | Description                                                  |
| --------------------------------------- | ------------------------------------------------------------ |
| `references/00-filesystem-structure.md` | Cache integration locations and bootstrap placement.         |
| `references/01-directive-use-cache.md`  | Correct directive usage and deterministic function criteria. |
| `references/02-cachetag-cachelife.md`   | Tag strategy, TTL strategy, and invalidation planning.       |
| `references/03-revalidate-tag.md`       | Mutation-side invalidation patterns.                         |
| `references/04-provider-setup.md`       | Memory/Redis provider setup and topology guidance.           |

## Tool index

| Name  | Description                                      |
| ----- | ------------------------------------------------ |
| `N/A` | This skill currently has no helper tool scripts. |

