This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace SmashBalloon\YouTubeFeed\Services\Admin;
use Smashballoon\Stubs\Services\ServiceProvider;
use SmashBalloon\YouTubeFeed\Helpers\Util;
class CacheService extends ServiceProvider {
public function register() {
add_action( 'wp_ajax_sby_clear_cache', [ $this, 'ajax_clear_cache' ] );
}
public function ajax_clear_cache() {
Util::ajaxPreflightChecks();
// clear object cache
sby_clear_object_cache();
// clear transients
sby_clear_cache();
wp_clear_scheduled_hook( 'sby_feed_update' );
wp_send_json_success();
}
}