Set Redis cache prefix key on Symfony

前端 未结 1 1228
灰色年华
灰色年华 2021-01-24 16:32

I\'m using Redis to manage some caching within my Symfony 3.4 app, configured like this:

config.yml

framework:
    cache:
        defaul         


        
相关标签:
1条回答
  • 2021-01-24 17:22

    Yes you have to set a fixed key (as they said in the Symfony Doc).

    You can use also the environment name (dev, staging, prod... - SYMFONY_ENV or APP_ENV) with the application name if you want to use the same Redis cluster for staging and prod for example.

    framework:
        cache:
            ...
            prefix_seed: '%kernel.environment%_myapp'
            ...
    
    0 讨论(0)
提交回复
热议问题