Back to Bricks

Redis Cache

Infra

High-performance in-memory data store for caching and session management.

rediscacheperformancedatabase
Backend:
models/Redis Cache.jsjavascript
1// No Prisma model for Redis, but here is the client connection
2// Place this in config/redis.js manually or use the controller
3

Paste Guide

Copy files to:

models/Redis Cache.jscontrollers/redisController.jsroutes/redisRoutes.js

Add to server.js:

app.use('/api/redis', require('./routes/redisRoutes'));

Stack

Redis

Test Examples

curl -X POST http://localhost:5000/api/redis -d '{"key": "foo", "value": "bar"}'
curl http://localhost:5000/api/redis/foo