Open selo-ecube opened 7 years ago
@selo-ecube yes, that's a solution anybody can apply now. It has already been applied to my working branch for some time already, but I still need some time to apply it to the demo and Starter because now the priority is to provide v1.0.0 and hopefully any person having this problem in the next weeks will find this issue.
But as I said in the other issue, this has performance issues, and the only good solution comes from a change on the frontend side.
In any case, I'll leave this issue open to remember to apply it everywhere and provide some documentation mentioning the cache annotations. The idea was to provide caching annotations suitable for other situations too, but finding the right cache headers for every situation is a hard task :)
Already applied everywhere since v1.0.0-M1, missing documentation.
Thanks @mmoelli for bringing #561 to attention again, which helped us to solve the following issue. Maybe it is possible to solve it in general.
Please consider the following scenario that applies to our own Sunrise-based shop as well as to demo.commercetools.com:
This problem can be solved by adding the @NoCache annotation to the controller of the product overview controller (and any other controller that lists facets). Then in step 3, the page will be reloaded, and thereafter no facet value will be selected but List1 will be shown.
@lauraluiz Is that the solution you favour? It could be applied in commercetools-sunrise-java-starter. Do you think it makes sense to add documentation on Caching in commercetools-sunrise-java?
Thanks!