简体   繁体   English

Prestashop Nginx FastCgi 缓存

[英]Prestashop Nginx FastCgi Caching

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 1.7 中启用 Nginx FastCgi 缓存,但我找不到任何方法来检测登录用户或具有活动购物车的用户以绕过缓存。

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. Prestashop 似乎没有为听者实现正确的缓存控制机制(响应头始终是Cache-Control: no-store, no-cache, must-revalidate ),并且 cookie 是加密的。

Is there any way of enabling this type of cache correctly ?有没有办法正确启用这种类型的缓存?

I've also searched about varnish with no luck at all我也搜索过清漆,但完全没有运气

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).我遇到了同样的需求,尝试了 Nginx Cache 和 Varnish,但在每种情况下,您都需要自己处理缓存失效 - 这需要付出很多努力,而且您还必须考虑涉及所有第三方“动态”内容(如第三方)派对模块)。

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.如果你需要全页面缓存,我强烈建议你依赖一些已经开发的模块(即广泛使用的 Pagecache)和一个专门的 Memcached 服务器来存储缓存数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM