Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Now that Dynamic Page Cache has landed (https://www.drupal.org/node/2565453), we need to figure out a game plan for how this will work.
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedOur first step is ensuring our formatters declare the right cache contexts.
I spoke to WimLeers about our price formatters, and the fact that they depend on the locale (which is language + country).
After a lot of back&forth we decided that Commerce should not define a locale cache context, instead it should define a country cache context, then return language + country as the formatter contexts.
Issues:
#2571387: Convert the country and locale resolvers to return value objects
#2571393: Create a country cache context
#2571395: Return the right cache contexts from the price formatters
The next step is ensuring that the cart blocks and pages have the correct cache contexts (such as session).
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedRetitling. We need to find out how to test this.
Comment #4
mglamanGoing to close this as outdated. There's a 2.x site out in the wild, didn't notice issues. We also have some decent test coverage. Any items will be discovered and probably opened as individual bugs and not commented here.
Comment #5
felipep CreditAttribution: felipep commentedIf dynamic_page_cache is activated, I have issues changing the variation in the add_to_cart_form.
After an ajax request, if there is no article in the cart, then a JSON comes back, if I add an article to the cart and then change the variation then I got a html as response.
Disabling the dynamic_page_cache in settings.php solves the problem, but that is not a good solution.