WPSEO_Sitemaps_Cache_Validator::invalidate_storage() public Yoast 3.2
Invalidate sitemap cache.
{} Это метод класса: WPSEO_Sitemaps_Cache_Validator{}
Хуков нет.
Возвращает
null.
Использование
$result = WPSEO_Sitemaps_Cache_Validator::invalidate_storage( $type );
- $type(null/строка)
- The type to get the key for. Null for all caches.
Список изменений
С версии 3.2 | Введена. |
Код WPSEO_Sitemaps_Cache_Validator::invalidate_storage() WPSEO Sitemaps Cache Validator::invalidate storage Yoast 15.9
public static function invalidate_storage( $type = null ) {
// Global validator gets cleared when no type is provided.
$old_validator = null;
// Get the current type validator.
if ( ! is_null( $type ) ) {
$old_validator = self::get_validator( $type );
}
// Refresh validator.
self::create_validator( $type );
if ( ! wp_using_ext_object_cache() ) {
// Clean up current cache from the database.
self::cleanup_database( $type, $old_validator );
}
// External object cache pushes old and unretrieved items out by itself so we don't have to do anything for that.
}