PHOENIX-MEDIA / Magento-PageCache-powered-by-Varnish

Community version which is available on Magento Connect (http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html)
89 stars 49 forks source link

Not caching after add a product to cart #13

Closed arisdario closed 9 years ago

arisdario commented 9 years ago

I have noticed via support ticket the issue but i see that was ignored, the issue with this module is that when you add a product to the basket, Varnish just break and MISS every hit, tested on http://magento.phoenix-media.eu/

  1. Navigate all pages, to get the first hit.
  2. Add a product to cart, Checkout or just Delete it from cart.
  3. Navigate again the pages you've navigated before, and see if are still fast.

On firebug you will see that X-Cache will return MISS, to cache again you need to remove the cookies from the entire site, and voila it will cache again.

But... you need to tell this to each client visit your webiste... So, for some people that just navigate your website and not add a product to cart is good, but for possible buyers the varnish module is not good, also on add a product to cart it show empty cart !.

Hope the team resolve this issue !

PHOENIX-MEDIA commented 9 years ago

When I add smth in the cart the Varnish still serves cached pages as we are using PageCache powered by Varnish Enterprise in the public demo store. However, I can reproduce the issue when I do a complete checkout. We will look into it.

arisdario commented 9 years ago

I made a videoscreen maybe you can understand better.

https://www.youtube.com/watch?v=ezDG93O37w8

PHOENIX-MEDIA commented 9 years ago

Thanks for the screencast. So neither adding a product to the cart nor removing it again seem to be an issue. However somewhere in the checkout you receive an EXTERNAL_NO_CACHE cookie which deactivates caching in Varnish. That said: A MISS does not mean the pages can not be cached. It can also mean the page is currently not in the cache and has to be retrieved. Furthermore our demo store runs on two Varnish servers with a loadbalancer in front, so caching is not always consistent. To get sure go back to the home page and reload the page 2-3 times. If you still get a MISS and you have a EXTERNAL_NO_CACHE cookie Varnish does not serve cached pages anymore for the client.

Thanks again, we will analyze the problem and provide a patch ASAP.

PHOENIX-MEDIA commented 9 years ago

@arisdario thanks again for your deep dive into this issue. We resolved the problem now in our test environment. It was an issue in our enterprise module with ESI enabled, so no fix is required for the community version. The community version does not support caching as soon as a product is added to the cart or the customer logs in. So the subject of this issue describes a normal behavior of the community module.

arisdario commented 9 years ago

LOL

epiblue commented 9 years ago

LOL!!!!!! SPENT DAYS CONFIGURING IT TO FIND THAT IT'S BASICALLY USELESS !!!

arisdario commented 9 years ago

It is easy, but you need some minimum knowledge about installing apps on Centos or Ubuntu Server, after installing Varnish you just need to reverse the 80 port between Apache or Nginx and Varnish to get Varnish working on front, then just copy and adjust as your requeriments the vcl file.

What i have asked and sugested here is/"Was" a bug in the plugin, they has fixed the bug but only on Paid version, for the free version the bug is still there.

Keep in mind that there are some other bugs, like adding product to cart, some times it will not add your product to the cart and will show Cart empty, the fixed this with the keys but is not enough, search a bit more on google and you will find a custom module created to fix this issue.

Best regards,