Skip to content

“indexer_update_all_views” cron is clearing all the cache in magento 2

So i am facing a issue in our shop that updating a product is invalidating the all shop cache after debuging this i have found that this is default magento issue where savig the product and then run the cron:run command it will flush all the cache of the shop anyone faced this issue before and help me to solve this i have checked in git and this issue is related (https://github.com/magento/magento2/issues/37834)

Steps I followed to reproduce this issue:

Cloned Magento with sample data and set the indexer mode to “Update On Schedule.”

Updated a product(title,description etc) that is assigned to only one category and saved it.

After saving, only the cache for that product and its assigned category was invalidated, as expected.

I then ran the cron job, and after checking the pages again, all cache was invalidated. After debugging, I found that the cron job “indexer_update_all_views” is responsible for this behavior

Anyone know the solution or workaround to resolve it