Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

You have the following config in the config/packages/framework.yaml:

framework:
    cache:
        # Unique name of your app: used to compute stable namespaces for cache keys.
        prefix_seed: symfony7

        # The "app" cache stores to the filesystem by default.
        # The data in this cache should persist between deploys.
        # Other options include:

        # Redis
        #app: cache.adapter.redis
        #default_redis_provider: redis://localhost

        # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
        #app: cache.adapter.apcu

        # Namespaced pools use the above "app" backend by default
        pools:
            iss_location_pool: null

And you want to use Redis as the cache adapter but only on production to get better performance than the filesystem cache. Your cloud hosting says that all you need to do is configure your Symfony application to use the Redis adapter and set it to the REDIS_URL env var.

How can you set it up for the prod environment?

userVoice