Skip to content

Use Redis to cache your app and cut database load

Caching means storing the result of expensive work (a database query, a rendered page, an API call) so you don’t redo it every request. Redis — an in-memory data store — is the standard tool for it, and it’s installed and running on every OrbixPanel server at 127.0.0.1:6379.

When caching helps

  • Pages that run the same database queries for every visitor.
  • Expensive computations or third-party API calls.
  • Sessions and rate-limiting counters.

If your app is mostly static files, you may not need Redis at all — a page cache or a CDN is enough.

Connect your framework

Because Redis runs on localhost, you just point your app at it. No network setup.

Laravel — in .env:

CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379

Node.js (ioredis / node-redis):

import Redis from 'ioredis';
const redis = new Redis({ host: '127.0.0.1', port: 6379 });

WordPress — use the Redis Object Cache plugin; see Speed up WordPress.

Check it’s working

In the web terminal:

Terminal window
redis-cli ping # → PONG
redis-cli info stats | grep keyspace_hits

Rising keyspace_hits means your cache is being used.

Don’t over-cache. Cache data that’s expensive and changes rarely. Give cached entries a sensible expiry so users don’t see stale content.


Running OrbixPanel? Redis is pre-installed on every server. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.