Using the Drupal Commerce, when added a product to cart in the product display page, The status message saying "Product X added to cart" isn't displayed only if I refresh the page.

I think is because the Nginx microcache.


fall_0ut created an issue. See original summary.

memtkmcc’s picture

We have a giant global.inc file in BOA to handle all exceptions like this.

Not sure if we should incorporate some of them in Aegir directly, if Nginx with microcaching is used?

Note that you could also add in your affected site's local.settings.php this snippet:

 * Custom Speed Booster TTL override, for example to force no-cache
 * on some selected URLs which need to be excluded to always provide
 * dynamic results.
 if (preg_match("/^\/(?:foo|bar)/", $_SERVER['REQUEST_URI'])) {
   header('X-Accel-Expires: 1'); // This disables Speed Booster
   $conf['cache'] = 0; // This disables page caching on the fly

You could do the same for all POST and AJAX requests, and in BOA we even set special cookie when visitor submits a form, adds an item to the cart, etc, to prevent Nginx from displaying a cached page.

memtkmcc’s picture

Version: 7.x-3.9 » 7.x-3.x-dev
Assigned: Unassigned » memtkmcc
Priority: Major » Normal