PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / trunk
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript vtrunk
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
← All changes | inc/thirdparty/hosting/Pressable.php +15 -1 1.9.3trunk View file →
@@ -4,9 +4,9 @@
4 4 class Pressable extends berqIntegrations {
5 5
6 6 function __construct() {
7 7 add_action('berqwp_flush_all_cache', [$this, 'flush_cache']);
8 - add_action('berqwp_stored_page_cache', [$this, 'flush_cache']);
8 + add_action('berqwp_stored_page_cache', [$this, 'flush_page_cache']);
9 9 add_action('berqwp_flush_page_cache', [$this, 'flush_cache']);
10 10 add_action('init', [$this, 'bypass_cache']);
11 11 }
12 12
@@ -32,9 +32,23 @@
32 32 return;
33 33 }
34 34
35 35 wp_cache_flush();
36 + berqReverseProxyCache::flush_all();
37 + }
38 +
39 + function flush_page_cache($slug) {
40 +
41 + if (!$this->is_pressable()) {
42 + return;
43 + }
44 +
45 + if (empty($slug)) {
46 + $slug = '/';
47 + }
48 +
49 + berqReverseProxyCache::purge_cache(home_url($slug));
36 50 }
37 51
38 52 }
39 53
40 54 new Pressable();