3

We figured out that we are a bit unsure about what exactly is stored in redis "page and default cache".

Until now, we thought it is only about configuration, and maybe some page templates. But today, we rolled back a deployment in a test system, and at least one feature was not rolled back until we cleared the redis cache.

That one feature was a patch to a module in the vendors directory.

We wonder now what exactly is cached in the redis and default cache in order to know in which situations after a deployment we have to clear the cache.

Any suggestions?

0

Since I checked on this topic too, I'll provide my latest findings:

According to the magento 2 docs:

"The Magento application has a default cache frontend you can use for any cache type."

This means, that you can specify all cache types in the cache->frontend section of the env.php file.

If you check out the cache types you'll notice that there are more than just the "default" and "page_cache" types to set. Although, according to https://www.mageplaza.com/:

"The default cache segment enables you to configure all cache segments except for page_cache (the full page cache)."

This means, the default type covers the following data:

  • config
  • layout
  • block_html
  • collections
  • reflection
  • db_ddl
  • compiled_config
  • eav
  • customer_notification
  • config_integration
  • config_integration_api
  • config_webservice
  • translate

and the page_cache covers the full_page.

To cover your question, since I'm not sure what exactly your patch did, I assume, that either the patched content was still in the full_page cache or maybe part of the config, layout or block_html caches?

I suggest, that you clear all caches after a deployment in any case, to get rid of old artifacts still floating around in some cache. This will prevent confusion and debugging times if something old is still there, but should not be there anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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