Redis Cache
Configuration
Section titled “Configuration”[cache]cache_type = "Redis"redis_url = "redis://localhost:6379"max_size_mb = 100What’s cached
Section titled “What’s cached”- Product catalogue queries
- Category listings
- Session data
- Rate limiter state
Without Redis
Section titled “Without Redis”Default is in-memory cache (cache_type = "Memory"). Works for single-instance deployments.
Redis setup
Section titled “Redis setup”# Install Redissudo apt install redis-server
# Configure Redissudo vim /etc/redis/redis.conf# Set: requirepass your_password
# Update rCommerce config[cache]cache_type = "Redis"redis_url = "redis://:your_password@localhost:6379"Multiple instances
Section titled “Multiple instances”With Redis, multiple rCommerce instances can share cache and session data:
Instance 1 → Redis ← Instance 2Cache invalidation
Section titled “Cache invalidation”Cache is automatically invalidated when:
- Products are created/updated/deleted
- Categories change
- Orders are placed
- Configuration changes