run:R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
9.55 KB
2026-04-09 18:51:36
R W Run
3.98 KB
2026-04-09 18:51:36
R W Run
error_log
📄Plugin.php
1<?php
2/**
3 * Copyright © 2019-2026 Rhubarb Tech Inc. All Rights Reserved.
4 *
5 * The Object Cache Pro Software and its related materials are property and confidential
6 * information of Rhubarb Tech Inc. Any reproduction, use, distribution, or exploitation
7 * of the Object Cache Pro Software and its related materials, in whole or in part,
8 * is strictly forbidden unless prior permission is obtained from Rhubarb Tech Inc.
9 *
10 * In addition, any reproduction, use, distribution, or exploitation of the Object Cache Pro
11 * Software and its related materials, in whole or in part, is subject to the End-User License
12 * Agreement accessible in the included `LICENSE` file, or at: https://objectcache.pro/eula
13 */
14
15declare(strict_types=1);
16
17namespace RedisCachePro;
18
19use RedisCachePro\Diagnostics\Diagnostics;
20use RedisCachePro\Configuration\Configuration;
21use RedisCachePro\ObjectCaches\ObjectCacheInterface;
22
23final class Plugin
24{
25 use Plugin\Extensions\Debugbar,
26 Plugin\Extensions\QueryMonitor,
27 Plugin\Analytics,
28 Plugin\Assets,
29 Plugin\Authorization,
30 Plugin\Dropin,
31 Plugin\Health,
32 Plugin\Licensing,
33 Plugin\Lifecycle,
34 Plugin\Meta,
35 Plugin\Network,
36 Plugin\Schedule,
37 Plugin\Settings,
38 Plugin\Transients,
39 Plugin\Updates,
40 Plugin\Widget;
41
42 /**
43 * The configuration instance.
44 *
45 * @var \RedisCachePro\Configuration\Configuration
46 */
47 protected $config;
48
49 /**
50 * Holds the plugin version number.
51 *
52 * @var string
53 */
54 protected $version;
55
56 /**
57 * Holds the plugin basename.
58 *
59 * @var string
60 */
61 protected $basename;
62
63 /**
64 * Holds the plugin directory.
65 *
66 * @var string
67 */
68 protected $directory;
69
70 /**
71 * Holds the plugin filename.
72 *
73 * @var string
74 */
75 protected $filename;
76
77 /**
78 * Holds the plugin website.
79 *
80 * @var string
81 */
82 const Url = 'https://objectcache.pro';
83
84 /**
85 * The capability required to manage this plugin.
86 *
87 * @var string
88 */
89 const Capability = 'objectcache_manage';
90
91 /**
92 * Initialize the plugin, load all extensions and register lifecycle hooks.
93 *
94 * @return self
95 */
96 public static function boot()
97 {
98 global $wp_object_cache;
99
100 $instance = new static;
101 $instance->version = Version;
102 $instance->basename = Basename;
103 $instance->filename = Filename;
104 $instance->directory = (string) realpath(__DIR__ . '/..');
105
106 if ($wp_object_cache instanceof ObjectCacheInterface) {
107 $instance->config = $wp_object_cache->config();
108 } else {
109 $instance->config = Configuration::safelyFrom(
110 defined('WP_REDIS_CONFIG') ? \WP_REDIS_CONFIG : []
111 );
112 }
113
114 foreach ((array) class_uses($instance) as $class) {
115 $name = substr((string) $class, strrpos((string) $class, '\\') + 1);
116
117 $instance->{"boot{$name}"}();
118 }
119
120 return $instance;
121 }
122
123 /**
124 * Returns the raw basename.
125 *
126 * @return string
127 */
128 public function basename()
129 {
130 return $this->basename;
131 }
132
133 /**
134 * Returns the cleaned up basename.
135 *
136 * @return string
137 */
138 public function slug()
139 {
140 return strpos($this->basename, '/') === false
141 ? $this->basename
142 : dirname($this->basename);
143 }
144
145 /**
146 * Returns the configuration instance.
147 *
148 * @return \RedisCachePro\Configuration\Configuration
149 */
150 public function config()
151 {
152 return $this->config;
153 }
154
155 /**
156 * Returns a singleton diagnostics instance.
157 *
158 * @return \RedisCachePro\Diagnostics\Diagnostics
159 */
160 public function diagnostics()
161 {
162 global $wp_object_cache;
163
164 static $diagnostics = null;
165
166 if (! $diagnostics) {
167 $diagnostics = new Diagnostics($wp_object_cache);
168 }
169
170 return $diagnostics;
171 }
172}
173