PluginProbe
ezCache / 1.3
ezCache v1.3
2.6.5 2.6.4 2.6.2 2.6.3 2.6.1 2.6.0 2.5.6 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5 2.2.1 2.2.2 trunk 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.3 1.3.1 1.3.10 1.3.11 All 49 releases
ezcache / advanced-cache.php

advanced-cache.php in ezCache 1.3, at advanced-cache.php

30 lines 829 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * ezCache Advanced Cache
4 */
5
6 // require utilities functions from the plugin
7 /** @noinspection PhpIncludeInspection */
8 include_once __DIR__ . '/plugins/ezcache/vendor/autoload.php';
9
10 if ( class_exists( '\Upress\EzCache\Cache' ) && ! function_exists( 'wp_cache_postload' ) ) {
11 global $ezcache;
12
13 /** @noinspection PhpFullyQualifiedNameUsageInspection */
14 $ezcache = \Upress\EzCache\Cache::instance();
15 $ezcache->maybe_serve_cached_data();
16
17 // this needs to run before wp_cache_postload but after checking a cache file exists
18 $ezcache->do_frontend_optimizations();
19
20 /**
21 * Start saving the cache file
22 * This function is called at wp-settings.php when WP_CACHE is true in wp-config.php
23 */
24 function wp_cache_postload() {
25 global $ezcache;
26
27 $ezcache->maybe_write_cache_file();
28 }
29 }
30