This guide will cover all sorts of topics related to Spree application performance
There are several configuration options you can put in
config/initializers/spree.rbto adjust API caching configuration:
Spree::Api::Config[:api_v2_cache_ttl] = 3600 # TTL for cached resources in seconds
This is the time when API objects will be available in cache storage. Objects such as Products also auto-expire when they are updated or one of their associated resources (eg. Variants) are updated also.
Sending emails, parsing big amounts of data - it's not recommended to do it in the web process.
To enable caching in the development environment please type in your project directory:
bin/rails dev cache
or if you're using Spree Starter
docker-compose run web rails dev:cache
After that, you will need to restart your webserver / or stop/start docker-compose.
We strongly recommend using Memcached or Redis as cache storage.
Starter is pre-configured to work with Memcached. To enable caching please set the ENV variables:
MEMCACHEDCLOUD_SERVERS- URL of the Memcached instance
MEMCACHEDCLOUD_PASSWORD- username/password required to access instance
MEMCACHED_POOL_SIZE- connection pool, defaults to