Back to Bricks
Redis Cache
InfraHigh-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 connection2// Place this in config/redis.js manually or use the controller3 Paste Guide
Copy files to:
models/Redis Cache.jscontrollers/redisController.jsroutes/redisRoutes.jsAdd 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