Skip to content

Redis Cache

[cache]
cache_type = "Redis"
redis_url = "redis://localhost:6379"
max_size_mb = 100
  • Product catalogue queries
  • Category listings
  • Session data
  • Rate limiter state

Default is in-memory cache (cache_type = "Memory"). Works for single-instance deployments.

Terminal window
# Install Redis
sudo apt install redis-server
# Configure Redis
sudo vim /etc/redis/redis.conf
# Set: requirepass your_password
# Update rCommerce config
[cache]
cache_type = "Redis"
redis_url = "redis://:your_password@localhost:6379"

With Redis, multiple rCommerce instances can share cache and session data:

Instance 1 → Redis ← Instance 2

Cache is automatically invalidated when:

  • Products are created/updated/deleted
  • Categories change
  • Orders are placed
  • Configuration changes