-
Notifications
You must be signed in to change notification settings - Fork 1
/
filecache.php
executable file
·72 lines (65 loc) · 1.74 KB
/
filecache.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
namespace O10n;
/**
* File Page Cache with PHP Opcache boost option
*
* Advanced file based page cache with PHP Opcache boost option (500x faster than Redis and Memcached)
*
* @link https://github.com/o10n-x/
* @package o10n
*
* @wordpress-plugin
* Plugin Name: File Page Cache with PHP Opcache boost
* Description: Advanced file based page cache with PHP Opcache boost option (500x faster than Redis and Memcached).
* Version: 0.0.2
* Author: Optimization.Team
* Author URI: https://optimization.team/
* GitHub Plugin URI: https://github.com/o10n-x/wordpress-file-page-cache
* Text Domain: o10n
* Domain Path: /languages
*/
if (! defined('WPINC')) {
die;
}
// abort loading during upgrades
if (defined('WP_INSTALLING') && WP_INSTALLING) {
return;
}
// settings
$module_version = '0.0.2';
$minimum_core_version = '0.0.48';
$plugin_path = dirname(__FILE__);
// load the optimization module loader
if (!class_exists('\O10n\Module')) {
require $plugin_path . '/core/controllers/module.php';
}
// load module
new Module(
'filecache',
'File Page Cache',
$module_version,
$minimum_core_version,
array(
'core' => array(
'filecache'
),
'admin' => array(
'AdminFilecache'
),
'admin_global' => array(
'AdminGlobalfilecache'
)
),
9,
array(
'page' => array(
'path' => 'page-cache/',
'file_ext' => '.html',
'alt_exts' => false,
'expire' => false // @todo 259200 // expire after 3 days
)
),
__FILE__
);
// load public functions in global scope
require $plugin_path . '/includes/global.inc.php';