-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmillicache.php
More file actions
103 lines (91 loc) · 2.21 KB
/
millicache.php
File metadata and controls
103 lines (91 loc) · 2.21 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* The plugin bootstrap file
*
* @link https://www.millipress.com
* @since 1.0.0
* @package MilliCache
*
* @wordpress-plugin
* Plugin Name: MilliCache
* Plugin URI: https://www.millipress.com/millicache
* Description: The most flexible Full Page Cache for scaling WordPress sites. Enterprise-grade in-memory store with Redis, ValKey, Dragonfly, KeyDB, or any alternative.
* x-release-please-start-version
* Version: 1.4.0
* x-release-please-end
* Requires at least: 6.6
* Requires PHP: 7.4
* Network: true
* Author: MilliPress Team
* Author URI: https://www.millipress.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: millicache
* Domain Path: /languages
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Define constants for the plugin.
*
* @since 1.0.0
*/
define( 'MILLICACHE_VERSION', '1.4.0' ); // x-release-please-version.
if ( ! defined( 'MILLICACHE_BASENAME' ) ) {
define( 'MILLICACHE_BASENAME', plugin_basename( __FILE__ ) );
if ( ! defined( 'MILLICACHE_FILE' ) ) {
define( 'MILLICACHE_FILE', __FILE__ );
define( 'MILLICACHE_DIR', __DIR__ );
}
}
/**
* Autoloader.
*
* @since 1.0.0
*/
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
/**
* Load MilliPress API functions.
*
* @since 1.0.0
*/
if ( file_exists( __DIR__ . '/functions.php' ) ) {
require_once __DIR__ . '/functions.php';
}
/**
* The code that runs during plugin activation.
*
* @since 1.0.0
*
* @return void
*/
function activate_millicache() {
\MilliCache\Admin\Activator::activate();
}
/**
* The code that runs during plugin deactivation.
*
* @since 1.0.0
*
* @return void
*/
function deactivate_millicache() {
\MilliCache\Admin\Deactivator::deactivate();
}
register_activation_hook( MILLICACHE_FILE, 'activate_millicache' );
register_deactivation_hook( MILLICACHE_FILE, 'deactivate_millicache' );
/**
* Begins execution of the plugin.
*
* @since 1.0.0
*
* @return void
*/
function run_millicache() {
$plugin = new MilliCache\MilliCache();
$plugin->run();
}
run_millicache();