Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
wp-content
/
plugins
/
depicter
/
vendor
/
averta
/
wordpress
/
src
/
Cache
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Averta\WordPress\Cache; class DatabaseCache extends WPCache { /** * {@inheritDoc} */ public function get( $key, $default = false ) { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::get( $key, $default ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * {@inheritDoc} */ public function set( $key, $value, $ttl = null ): bool { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::set( $key, $value, $ttl ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } /** * {@inheritDoc} */ public function delete( $key ): bool { global $_wp_using_ext_object_cache; $current_using_cache = $_wp_using_ext_object_cache; $_wp_using_ext_object_cache = false; $result = parent::delete( $key ); $_wp_using_ext_object_cache = $current_using_cache; return $result; } }