rrezartprebreza/spring-boot-skills / skills/spring-boot-3/spring-data-redis
spring-data-redis
VerifiedUse when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.2 KB |
| agents/openai.yaml | config | 192 B |
| examples/bad-cache-service.java | other | 1.3 KB |
| examples/good-cache-service.java | other | 1.1 KB |
| templates/AtomicWindowLimiter.java | other | 1.6 KB |
| templates/CoalescingRedisCacheManager.java | other | 1.1 KB |
| templates/OptionalCacheLookup.java | other | 1010 B |
| templates/RedisConfig.java | other | 3.5 KB |
templates/OptionalCacheLookup.java
View on GitHubpackage com.example.config;
import java.util.Optional;
import java.util.function.Supplier;
import org.springframework.dao.QueryTimeoutException;
import org.springframework.data.redis.RedisConnectionFailureException;
/** Read-only, disposable data caches. Never apply to authorization, sessions or rate limits. */
public final class OptionalCacheLookup {
private OptionalCacheLookup() {}
public static <T> Optional<T> read(Supplier<T> lookup, Runnable recordUnavailable) {
try {
return Optional.ofNullable(lookup.get());
} catch (RedisConnectionFailureException | QueryTimeoutException unavailable) {
try {
recordUnavailable.run();
} catch (RuntimeException observerFailure) {
org.slf4j.LoggerFactory.getLogger(OptionalCacheLookup.class)
.warn("Optional cache observer failed: {}", observerFailure.getClass().getSimpleName());
}
return Optional.empty();
}
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |