Skip to content
New issue

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

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

Already on GitHub? # to your account

Clear Cache after change per product ID #50

Open
chrisastley opened this issue Oct 29, 2021 · 1 comment
Open

Clear Cache after change per product ID #50

chrisastley opened this issue Oct 29, 2021 · 1 comment

Comments

@chrisastley
Copy link
Contributor

Hi,

I was looking at a way for your module to clear Cache of a product if a change it processed for it.

I found this info that details a procedure to clear Cache for a product ID and to purge varnish.
https://stackoverflow.com/questions/42627051/how-do-i-clear-the-cache-in-magento-2-for-a-single-product-id

At the moment if I automate a change it can take up to 24 hours to show if the product page is already cached and I don't like clearing the whole cache.

@garfix
Copy link
Collaborator

garfix commented Nov 4, 2021

I developed this library for BigBridge, but I left the company recently. My former colleagues will continue to maintain it.

As for your request, I could make this suggestion: the library works best if the product indexes are set to "Update by Schedule". If this is the case then database triggers, together with an active cron will take care of both partial reindexing and selective cache clearing of the affected products and their categories. This has always worked for me.

see also https://www.bigbridge.nl/blog/essential-magento-2-partial-reindexing/

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants