spring-boot-cache

spring-boot-cache is a skill for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 79 tokens per session (1,265 once invoked), scanned A, original, MIT.

A set of patterns for adding caching to Spring Boot services. Caching stores frequently used results temporarily, and the patterns cover Caffeine, Redis, and Ehcache providers, expiration, eviction, and cache metrics.

In plain words
What is it for?
Use it to cache reads, update or remove cached values after writes and deletes, set time-to-live rules, and inspect cache hit and miss behavior.
Why use it?
It helps reduce repeated database or service work while addressing stale entries and cache misses.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the developer-kit-java plugin — 52 skills, 11 commands, 9 agents shipped together

Good fit Use it to cache reads, update or remove cached values after writes and deletes, set time-to-live rules, and inspect cache hit and miss behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/giuseppe-trisciuoglio/developer-kit/spring-boot-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 giuseppe-trisciuoglio/developer-kit --skill spring-boot-cache
Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit

Made for: Claude Code.

Or install developer-kit-java, the plugin that ships this one along with the rest of its 52 skills, 11 commands, 9 agents.

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-boot-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache/github.svg)](https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache)
Your own site
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spring-boot-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/spring-boot-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,265 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. Third-party audits
  • Socket pass 1 Apr 2026
  • Snyk pass 1 Apr 2026
How audits are shown
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.00079 $0.01265
Opus 5 $0.00039 $0.00633
Sonnet 5 $0.00016 $0.00253
Haiku 4.5 $0.00008 $0.00127

Measured today against content hash 6260596e317f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

spring-boot-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 today.

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.

plugins/developer-kit-java/skills/spring-boot-cache/SKILL.md · 139 lines

How it starts

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

Spring Boot Cache Abstraction

Overview

6-step workflow for enabling cache abstraction, configuring providers (Caffeine, Redis, Ehcache), annotating service methods, and validating behavior in Spring Boot 3.5+ applications. Apply @Cacheable for reads, @CachePut for writes, @CacheEvict for deletions. Configure TTL/eviction policies and expose metrics via Actuator.

When to Use

  • Add @Cacheable, @CachePut, or @CacheEvict to service methods.
  • Configure Caffeine, Redis, or Ehcache with TTL and capacity policies.
  • Implement eviction strategies for stale data.
  • Diagnose cache misses or invalidation issues.
  • Expose hit/miss metrics via Actuator or Micrometer.

Instructions

  1. Add dependenciesspring-boot-starter-cache plus a provider:

    • Caffeine: caffeine starter
    • Redis: spring-boot-starter-data-redis
    • Ehcache: ehcache starter
  2. Enable caching — annotate a @Configuration class with @EnableCaching and define a CacheManager bean.

  3. Annotate methods@Cacheable for reads, @CachePut for writes, @CacheEvict for deletions.

  4. Configure TTL/eviction — set spring.cache.caffeine.spec, spring.cache.redis.time-to-live, or spring.cache.ehcache.config.

  5. Shape keys — use SpEL in key attributes; guard with condition/unless for selective caching.

  6. Validate setup — run integration test to confirm cache hit on second call; check GET /actuator/caches to verify cache manager registration; query GET /actuator/metrics/cache.gets for hit/miss ratios.

Examples

Example 1: Basic @Cacheable Usage

@Service
@CacheConfig(cacheNames = "users")
class UserService {

    @Cacheable(key = "#id", unless = "#result == null")
    User findUser(Long id) { ... }
}
First call → cache miss, repository invoked
Second call → cache hit, repository skipped

Example 2: Conditional Caching with SpEL

@Cacheable(value = "products", key = "#id", condition = "#price > 100")
public Product getProduct(Long id, BigDecimal price) { ... }

// Only expensive products are cached

Read the full file on GitHub · 139 lines

Files

What ships with it

4 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. today First seen · 139 lines · 79 tokens per session scan A 6260596e317f

Subscribe to this mod's changes

spring-boot-cache is a skill published in the GitHub repository giuseppe-trisciuoglio/developer-kit (343 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,265 once invoked, about $0.0004 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-10.

Related

Other skills, from other repositories

loom-caching

Caching strategies for performance optimization — cache-aside, write-through, write-behind, TTL policies, eviction, and stampede prevention.

cosmix/loom · 31 tokens

loom-search

Full-text search and search engine implementation.

cosmix/loom · 11 tokens

contentful-migration

Write and run Contentful content model migration scripts using the contentful-migration library and the Contentful CLI. Covers creating, editing, and deleting content types and fields, validations, editor interface configuration, editor layouts, sidebar widgets, entry transformations, tags, annotations, and the…

contentful/skills · 199 tokens

build-feature-store

Build a feature store using Feast for centralized feature management, configure offline and online stores for batch and real-time serving, define feature views with transformations, and implement point-in-time correct joins for ML pipelines. Use when managing features for multiple ML models, ensuring training-serving…

pjt222/agent-almanac · 86 tokens

upstash-ratelimit-js

Rate limiting for serverless and edge apps with the @upstash/ratelimit TypeScript/JavaScript SDK backed by Upstash Redis. Use when adding a rate limiter or throttling to an API route, Next.js middleware, Vercel Edge, Cloudflare Workers, or any HTTP endpoint; returning 429 Too Many Requests; choosing between fixed…

upstash/skills · 177 tokens

encore-go-cache

Cache data in Redis from Encore Go using cache.NewCluster and typed keyspaces from encore.dev/storage/cache. Type-safe key/value access with TTLs, atomic increments, and per-keyspace data shapes.

encoredev/skills · 49 tokens