admin管理员组文章数量:1416306
I am working on a plugin (widget) that is using some transients that are updated from time to time.
That said, when these transients are updated, I think I will need to flush the cache to display the new data properly.
Thus, I wonder if have some way to flush the cache only for widget instead of entire cache. Do you guys have some advice?
I am working on a plugin (widget) that is using some transients that are updated from time to time.
That said, when these transients are updated, I think I will need to flush the cache to display the new data properly.
Thus, I wonder if have some way to flush the cache only for widget instead of entire cache. Do you guys have some advice?
Share Improve this question asked Jan 7, 2014 at 17:13 Tiago HillebrandtTiago Hillebrandt 1393 bronze badges1 Answer
Reset to default 0if you want to flush the specific cache you can do that: the plugin has functions for that
<?php
flush_pgcache(); // Page cache
flush_dbcache(); // Database cache
flush_minify(); // Minify cache
flush_all(); // All caches
?>
and you just need to call it like this:
<?php
$w3_plugin_totalcache->flush_all();
?>
本文标签: W3 Total Cache plugin integration
版权声明:本文标题:W3 Total Cache plugin integration 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745254345a2650011.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论