-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Re-enable PriceBox block caching #19897
Re-enable PriceBox block caching #19897
Conversation
…oved as currency wasn't included in cache key, now is added via this plugin https://github.com/VortexCommerce/magento2/blob/23d76ed074d7d5e465cbed782a2831abe192de96/app/code/Magento/Catalog/Block/Category/Plugin/PriceBoxTags.php#L68) - Increase default cache time to 1 day (86400) this is more that acceptable as the cache key includes the current date so will not load for a new day which could have a new price rule, special price etc...
Hi @brucemead. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@magento-engcom-team give me test instance |
Hi @brucemead. Thank you for your request. I'm working on Magento instance for you |
Hi @brucemead, here is your new Magento instance. |
@magento-engcom-team can these instances not come with sample data? Is there a working crontab? Is Varnish enabled on the box? Thanks! |
Hi @brucemead, thanks for collaboration. Unforchantly, currently, we haven't an ability to configure instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brucemead!
QA note: please check that there is no regression of MAGETWO-59089: Problem with change currency
.
Unit test should be broken but it seems like Travis is not running tests properly yet.
Hi @orlangur, thank you for the review. |
@brucemead thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
@sidolov what happened here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-bystritsky I'm kindly ask you to squash commits before merging.
@orlangur I'll do it after all tests will pass. |
d8c4be7
to
8671715
Compare
@orlangur commits number reduced. |
Hi @brucemead, thank you for your contribution! |
@brucemead, @magento-engcom-team, @orlangur PriceBox has CAT_P cache tag and it means when any product was saved All the PriceBox caches were cleared. Take a look at the screenshot. And for example we use Redis as a cache storage and sometimes a query that clears cache by CAT_P tag is getting up to 300-400 mb. The size of the storage is unbelievably big after this fix. |
@durexlovesex unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request |
1 similar comment
@durexlovesex unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request |
This should never have been merged in. What's the point of caching rendered PriceBox HTML in Redis, especially with a FPC like Varnish (or even the built-in one) in place? Consider a very common architecture:
It's totally pointless to cache this rendered bit of HTML in Redis. Furthermore, it's actually erroneous, especially based on M2's recommended architecture, that places one Redis daemon on each instance. How is one supposed to update prices in such an architecture? Obviously, if one is only hosting a small shop where all daemons are running on the same machine, they would never understand the grave problem this introduces (@brucemead?). This was not a problem on the version we have in production ( I know personally my codebase will be setting the cache lifetime back to null, as this should never get cached. C'mon, guys, we have a FPC for a reason. This is all on top of @durexlovesex's very valid concern about memory and performance. My store has 500k unique SKUs, which is already a lot, so doubling that will be ludicrous. |
Description (*)
This issue is present on
2.2.x
and2.3.x
(not tested on less than2.1
)Manual testing scenarios (*)
Prerequisites
Testing steps
1.1. Go to a category page to warm page into cache
1.2. Trigger a purge of respective category page
1.3. Revisit page
1.4. Note TTFB
2.1. Go to a category page to warm page into cache
2.2. Trigger a purge of respective category page
2.3. Revisit page
2.4. Note TTFB (faster, considerably faster for category pages with complex product types)
Contribution checklist (*)