最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

W3 Total Cache plugin integration

programmeradmin1浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

if 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();
?>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论