}
/**
* Clears all of our cache.
*
* @since 4.1.5
*
* @return void
*/
public function clear() {
if ( $this->prefix ) {
$this->clearPrefix( '' );
return;
}
// If we find the activation redirect, we'll need to reset it after clearing.
$activationRedirect = $this->get( 'activation_redirect' );
aioseo()->core->db->truncate( $this->table )->run();
$this->clearStatic();
if ( $activationRedirect ) {
$this->update( 'activation_redirect', $activationRedirect, 30 );
}
// Bust the tableExists and columnExists cache.
aioseo()->internalOptions->database->installedTables = '';
}
/**
* Clears all of our cache under a certain prefix.
*
* @since 4.1.5
*
* @param string $prefix A prefix to clear or empty to clear everything.
* @return void
*/
public function clearPrefix( $prefix ) {
$prefix = $this->prepareKey( $prefix );
aioseo()->core->db->delete( $this->table )
->whereRaw( "`key` LIKE '$prefix%'" )
->run();
$this->clearStaticPrefix( $prefix );
}
/**
* Clears all of our static in-memory cache of a prefix.
*
* @since 4.1.5
*
* @param string $prefix A prefix to clear.
* @return void
*/
private function clearStaticPrefix( $prefix ) {
$prefix = $this->prepareKey( $prefix );
foreach ( array_keys( self::$cache ) as $key ) {
if ( 0 === strpos( $key, $prefix ) ) {
unset( self::$cache[ $key ] );
}
}
}
/**
* Clears all of our static in-memory cache.
*
* @since 4.1.5
*
* @param string $key A key to clear.
* @return void
*/
private function clearStatic( $key = null ) {
if ( empty( $key ) ) {
self::$cache = [];
return;
}
unset( self::$cache[ $this->prepareKey( $key ) ] );
}
/**
* Returns the cache table name.
*
* @since 4.1.5
*
* @return string
*/
public function getTableName() {
return $this->table;
}
}
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Utils\Cache" not found in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Core/Core.php:114
Stack trace:
#0 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(214): AIOSEO\Plugin\Common\Core\Core->__construct()
#1 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(95): AIOSEO\Plugin\AIOSEO->preLoad()
#2 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init()
#3 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance()
#4 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/all_in_one_seo_pack.php(96): aioseo()
#5 /home/valigeria/public_html/wp-settings.php(517): include_once('/home/valigeria...')
#6 /home/valigeria/public_html/wp-config.php(111): require_once('/home/valigeria...')
#7 /home/valigeria/public_html/wp-load.php(50): require_once('/home/valigeria...')
#8 /home/valigeria/public_html/wp-blog-header.php(13): require_once('/home/valigeria...')
#9 /home/valigeria/public_html/index.php(17): require('/home/valigeria...')
#10 {main}
thrown in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Core/Core.php on line 114