spring-cache

spring-cache is a skill for Claude Code from claude-dev-suite/claude-dev-suite. It costs 114 tokens per session (1,507 once invoked), scanned A, original, MIT.

A guide to Spring's caching system, which temporarily stores results so repeated requests can be answered without doing the same work again. It covers local and Redis-backed caches, expiration rules, cache keys, and keeping cached data current.

In plain words
What is it for?
Use it to add caching to Spring Boot methods with annotations, choose a cache manager, set time limits, build keys, and clear entries when data changes.
Why use it?
It reduces repeated database or service calls and helps applications respond faster, while providing ways to remove or update stale entries.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to add caching to Spring Boot methods with annotations, choose a cache manager, set time limits, build keys, and clear entries when data changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claude-dev-suite/claude-dev-suite/spring-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add claude-dev-suite/claude-dev-suite --skill spring-cache
Clone the repo
git clone --depth 1 https://github.com/claude-dev-suite/claude-dev-suite

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spring-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/claude-dev-suite/claude-dev-suite/spring-cache.svg)](https://agentmods.dev/skills/claude-dev-suite/claude-dev-suite/spring-cache)
Your own site
<a href="https://agentmods.dev/skills/claude-dev-suite/claude-dev-suite/spring-cache"><img src="https://agentmods.dev/badge/skills/claude-dev-suite/claude-dev-suite/spring-cache.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.01507
Opus 5 $0.00057 $0.00754
Sonnet 5 $0.00023 $0.00301
Haiku 4.5 $0.00011 $0.00151

Measured 3d ago against content hash c432a07613ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

spring-cache scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend-frameworks/spring-cache/SKILL.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spring Cache

Quick Start

@SpringBootApplication
@EnableCaching
public class Application {}

@Service
public class UserService {

    @Cacheable("users")
    public User findById(Long id) {
        return userRepository.findById(id).orElseThrow();
    }

    @CacheEvict(value = "users", key = "#id")
    public void deleteUser(Long id) {
        userRepository.deleteById(id);
    }
}
spring:
  cache:
    type: caffeine
    caffeine:
      spec: maximumSize=1000,expireAfterWrite=10m

Cache Annotations

@Cacheable

@Cacheable("products")
public Product findById(Long id) { }

@Cacheable(value = "products", key = "#category + '-' + #status")
public List<Product> findByCategoryAndStatus(String category, String status) { }

@Cacheable(value = "products", condition = "#id > 0")
public Product findByIdConditional(Long id) { }

@Cacheable(value = "products", unless = "#result == null")
public Product findByIdUnlessNull(Long id) { }

@Cacheable(value = "products", sync = true)  // One thread populates
public Product findByIdSync(Long id) { }

@CacheEvict

@CacheEvict(value = "products", key = "#id")
public void deleteProduct(Long id) { }

@CacheEvict(value = "products", allEntries = true)
public void clearProductCache() { }

@CacheEvict(value = "products", key = "#id", beforeInvocation = true)
public void deleteProductBeforeInvocation(Long id) { }

@CachePut

@CachePut(value = "products", key = "#product.id")
public Product saveProduct(Product product) {
    return productRepository.save(product);
}

@CachePut(value = "products", key = "#result.id")
public Product createProduct(CreateProductRequest request) {
    return productRepository.save(new Product(request));
}

@Caching (Multiple Operations)

@Caching(
    put = {
        @CachePut(value = "products", key = "#result.id"),
        @CachePut(value = "productsBySku", key = "#result.sku")
    },
    evict = {
        @CacheEvict(value = "productList", allEntries = true)
    }
)
public Product createProduct(CreateProductRequest request) { }

Read the full file on GitHub · 245 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 245 lines · 114 tokens per session scan A c432a07613ce

Subscribe to this mod's changes

spring-cache is a skill published in the GitHub repository claude-dev-suite/claude-dev-suite (30 stars, last pushed yesterday), licensed MIT. It adds 114 tokens to every session and 1,507 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

redis-patterns

Redis patterns — caching (cache-aside, write-through), sessions, pub/sub, work queues, distributed locks, data structures (sorted sets, streams, hashes). Covers ioredis, node-redis, Redis 7+. Use when designing Redis usage in Node.js or Python apps.

RaNDoM6913/claude-code-superkit · 61 tokens

cache

Design caching strategies with Redis.

barnburner121/claude-plugin-marketplace · 7 tokens

redis-patterns

Patterns d'utilisation Redis pour le cache, pub/sub, streams et sessions. Se déclenche avec "Redis", "cache distribué", "pub/sub Redis", "Redis streams", "session store. Also triggers on "Redis cache", "Redis pub/sub".

khalilbenaz/claude-skills-collection · 56 tokens

caching-strategy

Stratégie de cache adaptée à chaque cas d'usage (Redis, Memcached, in-memory, CDN) — quoi cacher, durée de vie, invalidation et cohérence. Se déclenche avec "cache", "Redis", "caching", "mise en cache", "cache invalidation", "CDN", "distributed cache", "réduire les appels à la base". Also triggers on "caching…

khalilbenaz/claude-skills-collection · 103 tokens

data-tier-cutover

The stateful-tier migration PROCEDURE skill — cut an app's SQL database + cache over from self-managed instances to a managed serverless target. A read-only procedure the generic agent runs alongside the id- infra-delivery steps: it drives the fail-closed cutover-mechanism DECISION TREE (snapshot-restore vs…

lukasrepublic/agentic-foundry · 233 tokens

websocket-engineer

Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.

eric861129/SKILLS_All-in-one · 36 tokens