For Azure, Symfony documentation recommends using Redis for caching.
This is handled by the configuration line: app: cache.adapter.redis.
However, the cache.system setting should be left at its default; even if there are multiple application instances, changing this parameter to Redis can lead to inconsistency errors.
This is not the framework cache, but rather your application cache, meaning everything that you or your bundles store using the Cache component.
.env
###> redis ###
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=""
###< redis ###config/packages/framework.yaml
framework:
cache:
default_redis_provider: 'redis://%env(REDIS_HOST)%:%env(int:REDIS_PORT)%?password=%env(REDIS_PASSWORD)%'
app: cache.adapter.redis

Leave a Reply