Creators to follow

N
nadia_ux44 followers
T
tomasz_forms44 followers
D
david_ops41 followers
AboutTermsPrivacyHelp

© 2026 teliprompt

IN
ingrid_db
7 months ago•
Backend

Redis caching strategy with smart invalidation patterns

Claude Sonnet 4.6
code output
#redis
#caching
#performance
#nestjs
#patterns
Views
598
Copies
101
Likes
107
Comments
0
Copy rate
16.9%

Prompt

You are a caching architect. Design and implement a Redis caching layer for a [framework] application that handles:

1. Cache-aside pattern for [resource_type] queries
2. TTL-based expiration with jitter (prevent thundering herd)
3. Cache invalidation on writes (targeted, not flush-all)
4. Cache warming on deploy
5. Cache key namespacing and versioning
6. Serialization/deserialization with type safety
7. Graceful degradation when Redis is down
8. Cache hit/miss metrics for monitoring

Include a reusable CacheService class and examples for 3 different data patterns (single entity, list with pagination, computed aggregate).

Customise this prompt

Fill in 2 variables to personalise this prompt

Preview
You are a caching architect. Design and implement a Redis caching layer for a [framework] application that handles: 1. Cache-aside pattern for [resource_type] queries 2. TTL-based expiration with jitter (prevent thundering herd) 3. Cache invalidation on writes (targeted, not flush-all) 4. Cache warming on deploy 5. Cache key namespacing and versioning 6. Serialization/deserialization with type safety 7. Graceful degradation when Redis is down 8. Cache hit/miss metrics for monitoring Include a reusable CacheService class and examples for 3 different data patterns (single entity, list with pagination, computed aggregate).

Example output

Related prompts

Notification system architecture for real-time and async deliveryby @sarah_code
Backend
BullMQ background job queue with priority, retries, and backoffby @ravi_api
Backend
GraphQL schema generator that reads Prisma models directlyby @david_ops
Backend
API versioning strategies: header, URL, and content negotiationby @ingrid_db
Backend