spring-boot-cache

仓库创建 2025年10月21日最近提交 1 个月前SkillHot 收录 22 天前
▸ 精选理由

系统化的6步实践,适合为现有服务快速添加可测缓存层。

这个 Skill 做什么

为 Spring Boot 提供缓存抽象与实现模式,支持 Redis/Caffeine/EhCache 与注解使用。

提供在 Spring Boot 中落地缓存的实用模式:配置 Redis/Caffeine/EhCache、设定 TTL 与驱逐策略,配合 @Cacheable/@CachePut/@CacheEvict 注解使用,并通过 Actuator 暴露命中率等指标。适合给读多写少或性能敏感的服务加速、控制缓存过期和排查 cache miss。优点是覆盖从配置到验证的全流程,便于诊断与监控缓存行为。

▸ 展开 SKILL.md 英文原文

Provides patterns for implementing Spring Boot caching: configures Redis/Caffeine/EhCache providers with TTL and eviction policies, applies @Cacheable/@CacheEvict/@CachePut annotations, validates cache hit/miss behavior, and exposes metrics via Actuator. Use when adding caching to Spring Boot services, configuring cache expiration, evicting stale data, or diagnosing cache misses.

开发编程Spring缓存Redis/Caffeine通用
311
Stars
37
Forks
40
仓库内 Skill
+10
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-cache/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-cache/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# 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.

## Instructi
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有