【问题标题】:Some specific block on a wordpress page should not be cached from varnish不应从清漆缓存 wordpress 页面上的某些特定块
【发布时间】:2021-06-17 13:48:26
【问题描述】:

我正在为这个网站http://beautyqa.nykaa.com/ 使用 varnish 3.0。如果您在此处打开此链接http://beautyqa.nykaa.com/how-does-the-freedom-to-use-makeup-feel/,您会在文章标题下方找到一些后期元信息,例如“2015 年 8 月 7 日 | 由 Madhavi Irani 发布 | BeautyBookSTYLE ALERT | 2 cmets | 329 次浏览强>”。不应从清漆缓存这么多信息,因为每次页面加载时都需要增加查看次数。在single.php 中,我正在调用一个函数post_meta_details(),它返回相同的信息。

【问题讨论】:

    标签: wordpress varnish


    【解决方案1】:

    stackoverflow 上已经有一个good answer。 你在找ESIfeatures

    不幸的是,这并不容易集成到 wordpress 中。

    我也建议寻找一个通过 ajax 提供大量 cmets 和视图的插件。所以它可以绕过清漆缓存。

    请记住,您必须使用 varnish 将 wp-ajax.php 路由从缓存中排除。

    【讨论】:

      猜你喜欢
      • 2011-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-09
      • 2015-07-11
      • 2012-09-20
      • 2017-02-22
      • 1970-01-01
      相关资源
      最近更新 更多