Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Not invalidating cache of product when updating product in Magento #373

Open
andres-linares2211 opened this issue Dec 30, 2020 · 6 comments

Comments

@andres-linares2211
Copy link

Hi everyone, we've just noticed this issue in our website. When we use the command bin/magento vsbridge:reindex --store=viu the invalidation happens and all the data is updated.

But whenever we change something specific in a product, let's say its price. The elasticsearch data is updated accordingly but the cache is not invalidated. This causes that when the product is visited and SSR happens, we see outdated data and when visited via CSR the data is correct.

We're not sure if this has something to do with configuration or this is plainly a bug. Thanks.

@andres-linares2211
Copy link
Author

This happens also for CMS Pages

@haelbichalex
Copy link

#369 would probably fix this

@andres-linares2211
Copy link
Author

It would, probably. For now we are listening the indexers and making a full invalidation (which is not the best, but a workaround)

@haelbichalex
Copy link

haelbichalex commented Jan 29, 2021

@andres-linares2211 In case you didn't know: You can also apply this PR by using composer-patches, described in Magento Docs here. (Which is what we will do until this is merged and released)

@andres-linares2211
Copy link
Author

@haelbichalex thank you so much! We didn't know such thing existed!

@SolsWebdesign
Copy link

@haelbichalex so how does that work? I downloaded the commit from https://github.com/vuestorefront/magento2-vsbridge-indexer/commit/95da6e6f8dd9ad859f4c4e39c71a83597e58aba6.diff and saved it locally in a patches/composer directory as a file named 95da6e6.diff
and in my composer I then have:
"require": {
"cweagans/composer-patches": "~1.0",
...
"extra": {
"magento-force": "override",
"patches": {
"root-patches": {
"this_patch": "/data/web/magento2/patches/composer/95da6e6f8dd9ad859f4c4e39c71a83597e58aba6.diff"
}
}
}
and then I simply run composer update? I think I'm missing something, right? Somehow it isn't updating the code and I still have the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants