vuestorefront / magento2-vsbridge-indexer

This is official Vue Storefront, native, Magento2 indexer
https://vuestorefront.io
MIT License
68 stars 90 forks source link

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

Open andres-linares2211 opened 3 years ago

andres-linares2211 commented 3 years ago

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 commented 3 years ago

This happens also for CMS Pages

haelbichalex commented 3 years ago

369 would probably fix this

andres-linares2211 commented 3 years ago

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

haelbichalex commented 3 years ago

@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 commented 3 years ago

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

SolsWebdesign commented 3 years ago

@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 95da6e6f8dd9ad859f4c4e39c71a83597e58aba6.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.