Skip to main content

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Caching improves performance by storing the results of expensive database queries and template renders in memory.

Setting up Redis as Cache Store

Spree comes pre-configured to use Redis for caching in production. Just set the REDIS_URL environment variable — no gem installation or code changes needed.
REDIS_URL=redis://localhost:6379/0
When REDIS_URL is set, Spree automatically uses it for caching. When not set, it falls back to an in-memory cache store.

Testing Locally

To enable caching in the development environment:
cd server
bin/rails dev:cache
You will need to restart your web server after this.