|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/public_html/wp/wp-content/plugins/wp-statistics/src/Components/ | |
|
Path: //home2/gazetufm/public_html/wp/wp-content/plugins/wp-statistics/src/Components/SystemCleaner.php
Size: 841 B
Permissions: 0644
<?php
namespace WP_Statistics\Components;
use WP_Statistics\Utils\Query;
use WP_Statistics\Service\Admin\LicenseManagement\ApiEndpoints;
class SystemCleaner
{
/**
* Clears a specific cache.
*
* @param string $cacheId
*/
public static function clearTransientById($cacheId)
{
return delete_transient("wp_statistics_cache_$cacheId");
}
/**
* Clears all caches.
*/
public static function clearAllTransients()
{
return Query::delete('options')
->where('option_name', 'LIKE', '%wp_statistics_cache%')
->execute();
}
/**
* Clears remote add-ons list cache.
*/
public static function clearAddonsListCache()
{
$request = new RemoteRequest(ApiEndpoints::PRODUCT_LIST, 'GET');
$request->clearCache();
}
}