3

Can I use the exact same config for redis for two different magento instances or do they access / write to the same cache? F.e. I have a "production" and "staging" instance of magento which have their own databases.

Do I need to configure redis different for those, or does redis caching by request uri / does know which cached version (f.e. of the home page) to serve for each instance of magento?

1 Answer 1

3

Redis configuration by itself won't have to change. The only thing that you need to change between your instances is the databases number in your /app/etc/env.php.

You might have to increase the amount of maximum database inside redis configuration (out of the box it should support plenty). But using different redis database number will allow the two magento instances cache not to mix-up.

See https://devdocs.magento.com/guides/v2.2/config-guide/redis/config-redis.html for the reference.

1
  • Thank you for your answer! I incremented the database value accordingly. Commented Aug 16, 2018 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.