1

I'm trying to enable Nginx FastCgi cache in Prestashop 1.7 but i cannot find any way detecting logged in users or users with active carts in order to bypass cache.

Prestashop seems to not implement a correct cache control mechanism for hearers ( Response Headers always are Cache-Control: no-store, no-cache, must-revalidate ), and cookies are encrypted.

Is there any way of enabling this type of cache correctly ?

I've also searched about varnish with no luck at all

sarakinos
  • 666
  • 11
  • 28

1 Answers1

1

I came across the same need, tried Nginx Cache and Varnish but in every case you need to handle cache invalidation by yourself - this would require a LOT of effort, also you have to consider all third party "dynamic" content is involved (like third party modules).

If you need full page caching I strongly suggest you to rely on some already developed modules (ie. the widely used Pagecache) with a dedicated Memcached server where to store the cache data.

gennaris
  • 1,467
  • 1
  • 11
  • 17
  • Thanks for the answer, my problem is that i can't cache anything since prestashop always use the no cache headers. A way to cache data in fastcgi for not logged in / empty carts users would be a huge boost. I am thinking of storing custom cookies for logged in users and users with carts. PrestaShop is always so stiff when it comes to flexibility – sarakinos Oct 16 '20 at 21:16