PluginProbe
ezCache / 2.6.0
ezCache v2.6.0
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 2.6.0, at advanced-cache.php

34 lines 897 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 if ( ! defined( 'ABSPATH' ) ) {
7 die( 'NO direct access!' );
8 }
9
10 // require utilities functions from the plugin
11 /** @noinspection PhpIncludeInspection */
12 include_once __DIR__ . '/plugins/ezcache/vendor/autoload.php';
13
14 if ( class_exists( '\Upress\EzCache\Cache' ) && ! function_exists( 'wp_cache_postload' ) ) {
15 global $ezcache;
16
17 /** @noinspection PhpFullyQualifiedNameUsageInspection */
18 $ezcache = \Upress\EzCache\Cache::instance();
19 $ezcache->maybe_serve_cached_data();
20
21 // this needs to run before wp_cache_postload but after checking a cache file exists
22 $ezcache->do_frontend_optimizations();
23
24 /**
25 * Start saving the cache file
26 * This function is called at wp-settings.php when WP_CACHE is true in wp-config.php
27 */
28 function wp_cache_postload() {
29 global $ezcache;
30
31 $ezcache->maybe_write_cache_file();
32 }
33 }
34