芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/critterchoice.com/wp-content/mu-plugins/object-cache-pro/src/Plugin.php
version = Version; $instance->basename = Basename; $instance->filename = Filename; $instance->directory = (string) realpath(__DIR__ . '/..'); if ($wp_object_cache instanceof ObjectCacheInterface) { $instance->config = $wp_object_cache->config(); } else { $instance->config = Configuration::safelyFrom( defined('\WP_REDIS_CONFIG') ? \WP_REDIS_CONFIG : [] ); } foreach ((array) class_uses($instance) as $class) { $name = substr((string) $class, strrpos((string) $class, '\\') + 1); $instance->{"boot{$name}"}(); } return $instance; } /** * Returns the raw basename. * * @return string */ public function basename() { return $this->basename; } /** * Returns the cleaned up basename. * * @return string */ public function slug() { return strpos($this->basename, '/') === false ? $this->basename : dirname($this->basename); } /** * Returns the configuration instance. * * @return \RedisCachePro\Configuration\Configuration */ public function config() { return $this->config; } /** * Returns a singleton diagnostics instance. * * @return \RedisCachePro\Diagnostics\Diagnostics */ public function diagnostics() { global $wp_object_cache; static $diagnostics = null; if (! $diagnostics) { $diagnostics = new Diagnostics($wp_object_cache); } return $diagnostics; } /** * Attempt to flush the object cache on a standalone * connection without throwing an error. * * @return bool */ public function flush() { try { $connection = $this->config->connector::connect($this->config); $this->logFlush(); return $connection->flushdb($this->config->async_flush); } catch (Throwable $th) { return false; } } }