Skip to content

Complete cache invalidation on Magento 2.4.6 #37834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 of 5 tasks
ahmed-midori opened this issue Aug 2, 2023 · 17 comments
Closed
3 of 5 tasks

Complete cache invalidation on Magento 2.4.6 #37834

ahmed-midori opened this issue Aug 2, 2023 · 17 comments
Labels
Area: Admin UI Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.6 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@ahmed-midori
Copy link

ahmed-midori commented Aug 2, 2023

Preconditions and environment

  • Magento 2.4.6
  • We have found that since updating to Magento 2.4.6 we are getting complete cache invalidations if a product changes to out of stock or if a product is edited in admin.

Steps to reproduce

The below issues have been found on a production site as well as a clean Magento install with sample data.

Issue 1 (product changes to out of stock):

If a shipment is created for the last available qty of a product making the product out of stock the complete site cache is invalidated.

Issue 2(Change to a product created in admin):

If any change is made to a product in admin such as change to product title or description then this also completely invalidates all cache site wide.

Expected result

Cache to be invalidated only for the product and the categories containing that product.

Actual result

Complete cache invalidation

Additional information

It is a huge inconvenience and not practical if you are running a site with many categories and 10's of thousands of products to have all cache invalidated just because a single product goes out of stock or a single product is edited.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 2, 2023

Hi @ahmed-midori. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-assistant
Copy link

m2-assistant bot commented Aug 2, 2023

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@ahmed-midori
Copy link
Author

ahmed-midori commented Aug 3, 2023 via email

@engcom-Dash
Copy link
Contributor

Hi @ahmed-midori ,

Sorry for inconvenience,

As discussed with internal team,We verified the issue in 2.4-develop instance and its not reproducible.
When we changing the product title and making products get out of stock at the time some of the cache only get invalidated,Kindly refer the below screenshots:
Initially it was idel=0:
Screenshot 2023-08-03 at 5 57 34 PM
After the making product as out of stock:
Screenshot 2023-08-03 at 5 58 26 PM
Screenshot 2023-08-03 at 5 58 04 PM
Thanks.

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Aug 3, 2023
@ahmed-midori
Copy link
Author

ahmed-midori commented Aug 3, 2023

Hi @engcom-Dash,

Thank you for your response. Please find below screenshots confirming the issue. You will see screenshots from the homepage, 2 different category pages, 2 different product pages and also a CMS page. All clearly show a cache hit.

image

image

image

image

image

image

As you will see from all the above screenshots all are showing a hit.

I then go to a product as per screenshots below and zero the qty's making the product out of stock:

image

image

Following the change of qty to zero/out of stock you will see that cache for everything becomes invalid as per screenshots below:

image

image

image

image

image

image

I can confirm that this cache invalidation occurs with every single product on the website, every single category, the homepage and all cms pages. All by just one product going out of stock.

Further to this and in relation to changes made to a product in admin I can confirm that a change to a product title for example performs exactly the same invalidation to all products, categories, cms pages and homepage.

Surely it cant be normal that in the instance where you have 100,000 products all cached and one of those products go out of stock all the other 99,999 products return a cache miss. Equally if a product is edited.

Please can you check. You will find that if you set a product qty to zero or change some such as title every single product, category, homepage, CMS page will result in a cache MISS.

Kind regards

@ahmed-midori
Copy link
Author

Hi @engcom-Dash

Please could you check this issue again. You will be able to confirm by the additional information I have provided. Im sure with tis you will be able to confirm the issue.

Kind regards

@engcom-Dash
Copy link
Contributor

Hi @ahmed-midori ,

Verified the issue in 2.4-develop instance and the issue is reproducible as per your last comment,Hence we are confirming the issue.

Kindly refer the below screenshots:
Screenshot 2023-08-08 at 5 24 48 PM
Screenshot 2023-08-08 at 5 25 04 PM
Screenshot 2023-08-08 at 5 25 36 PM
Screenshot 2023-08-08 at 5 29 45 PM
Following the change of qty to zero/out of stock :
Screenshot 2023-08-08 at 6 02 08 PM
Screenshot 2023-08-08 at 6 02 39 PM
Screenshot 2023-08-08 at 6 03 36 PM
Screenshot 2023-08-08 at 6 03 46 PM

@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Cache Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Admin UI labels Aug 8, 2023
@m2-community-project m2-community-project bot added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: needs update Additional information is require, waiting for response labels Aug 8, 2023
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-9284 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Aug 8, 2023

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

@ahmed-midori
Copy link
Author

Hi @engcom-Dash
Thank you for taking time and confirming the issue. When can we expect the issue to get resolved? Kindly let us know if there is any quick workaround patch.

@engcom-Hotel engcom-Hotel added Reported on 2.4.6 Indicates original Magento version for the Issue report. Priority: P3 May be fixed according to the position in the backlog. labels Aug 9, 2023
@Kevin9131
Copy link

any update on this?

@AntonMuxa
Copy link

any fix ?

@engcom-Bravo
Copy link
Contributor

Hi @ahmed-midori,

Thanks for your reporting and collaboration.

We have tried to reproduce the issue in latest 2.4-develop instance and the issue is no more reproducible.Kindly refer the screenshots.

Image Image Image

Hence we are closing this issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Admin UI Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.6 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

7 participants