Beispiel #1
0
 public static function scheduleCacheClear()
 {
     if (self::$clearScheduledThisRequest) {
         return;
     }
     self::$clearScheduledThisRequest = true;
     wp_schedule_single_event(time() - 15, 'wordfence_cache_clear', array(rand(0, 999999999)));
     //rand makes sure this is called every time and isn't subject to the 10 minute window where the same event won't be run twice with wp_schedule_single_event
     $url = admin_url('admin-ajax.php');
     wp_remote_get($url);
 }