Remote storage provides a cache layer for external API calls. The caching is based on the Flysystem caching solution, which provides cache adapters. Remote storage includes the following cache types:
- Memory cache—Memory cache is enabled by default and provides per-request cache.
- Redis cache—Redis cache is a persistent cache that is stored in Redis and requires an active Redis service with additional configuration.
Set up persistent Redis cache
To use Redis cache with predis/predis extension:
predis/predisextension to the
requiresection of your
composer require predis/predis
Use the following example to add a configuration to the
1 2 3 4 5 6 7 8 9 10 11 12 13
[ 'remote_storage' => [ # Remote storage configuration section 'cache' => [ 'adapter' => 'predis', 'config' => [ 'scheme' => 'tcp', # Required scheme 'host' => 'redis.internal', # Required hostname of Redis service 'port' => 6379 # Required port of Redis service ] ] ] ];