admin管理员组文章数量:1317906
I am using a currency widget to show live currencies for different countries. I also use W3 Total Cache plugin and the widget data is cached. For example yesterday's prices are shown for today and I have to manually purge all caches to get the new data.
Is there anyway to disable cache for certain widgets? or clear the cache every hour for that widget?
I am using a currency widget to show live currencies for different countries. I also use W3 Total Cache plugin and the widget data is cached. For example yesterday's prices are shown for today and I have to manually purge all caches to get the new data.
Is there anyway to disable cache for certain widgets? or clear the cache every hour for that widget?
Share Improve this question asked Dec 6, 2016 at 22:48 SamSam 112 bronze badges2 Answers
Reset to default 1You need to use fragment caching so enable PHP in the widget and then use the following tags:
<!-- mfunc -->
The following links should help:
https://wordpress/support/topic/using-shortcodes-with-fragment-caching/ https://www.justinsilver/technology/wordpress/w3-total-cache-fragment-caching-wordpress/
The recommended solution is to have your currency widget refresh its data via ajax.
本文标签: phpHow to exclude a widget from W3 Total Cache Plugin
版权声明:本文标题:php - How to exclude a widget from W3 Total Cache Plugin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742022884a2415007.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论