Skip to content
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

Sitemap generation cron job flushes entire cache #14857

Closed
scottsb opened this issue Apr 25, 2018 · 4 comments
Closed

Sitemap generation cron job flushes entire cache #14857

scottsb opened this issue Apr 25, 2018 · 4 comments
Assignees
Labels
Component: Framework/Cache Component: Sitemap Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@scottsb
Copy link
Member

scottsb commented Apr 25, 2018

Preconditions

Magento 2.1.12
Magento 2.2.3 (suspected based on looking relevant code, but not confirmed)

Steps to reproduce and actual result

Look at debug.log output at midnight (configured sitemap cron schedule) in store timezone for this output:

main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":[],"mode":"all"},"is_exception":false} []

This indicates the entire cache was flushed.

Expected result

Only FPC is flushed.

Discussion

The class \Magento\Sitemap\Model\Sitemap sets $_cacheTag = true, which AbstractModel::afterSave() and cleanModelCache() understand to mean it should flush the entire cache.

This was introduced by the core team's fix for MAGETWO-47607 (#2802). (Note that this is not the commit that #2802 was officially closed for; it seems that two different fixes for the same issue were merged.) See commits 6edb0da (2.2.x) and 3cd22e2 (backport to 2.1.x).

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Apr 25, 2018
@ghost ghost self-assigned this Jul 23, 2018
@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Component: Sitemap Component: Framework/Cache labels Jul 23, 2018
@ghost
Copy link

ghost commented Jul 23, 2018

Hi @scottsb , thank you for your report.
We've acknowledged the issue and added to our backlog.

@ghost ghost removed their assignment Jul 23, 2018
david-fuehr added a commit to david-fuehr/magento2 that referenced this issue Jan 30, 2019
magento#14857

Introduces a (dummy) cache tag for frontend in sitemap and robots generation. This prevents the
default and page_cache to be dropped completely. The cache tag for full_page cache is not
modified.
@larsroettig
Copy link
Member

Hi @scottsb,
my colleague David fixed the bug today.

best regards,

Lars

david-fuehr added a commit to david-fuehr/magento2 that referenced this issue Jan 31, 2019
magento#14857

Introduces a (dummy) cache tag for frontend in sitemap and robots generation. This prevents the
default and page_cache to be dropped completely. The cache tag for full_page cache is not
modified.
@milindsingh milindsingh self-assigned this Feb 2, 2019
@magento-engcom-team
Copy link
Contributor

Hi @milindsingh. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 5, 2019
@magento-engcom-team
Copy link
Contributor

Hi @scottsb. Thank you for your report.
The issue has been fixed in #20818 by @david-fuehr in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

david-fuehr added a commit to david-fuehr/magento2 that referenced this issue Mar 11, 2019
magento#14857

Introduces a (dummy) cache tag for frontend in sitemap and robots generation. This prevents the
default and page_cache to be dropped completely. The cache tag for full_page cache is not
modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Cache Component: Sitemap Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

4 participants