Jake Vanderwerf
2026-01-25 b38f03c0e7218762d90fa5092696b127f24f36db
inc/managers/queue/Storage.php
@@ -4,15 +4,14 @@
   exit;
}
use JVBase\managers\CacheManager;
use JVBase\managers\Cache;
class Storage
{
   private \wpdb $wpdb;
   private string $table;
   private CacheManager $cache;
   private Cache $cache;
   private const CACHE_USER_PREFIX = 'user_queue_';
   private const CACHE_QUEUE_INFO = 'queue_info';
   public function __construct()
@@ -20,7 +19,7 @@
      global $wpdb;
      $this->wpdb = $wpdb;
      $this->table = $wpdb->prefix . BASE . '_operation_queue';
      $this->cache = CacheManager::for('queue', DAY_IN_SECONDS);
      $this->cache = Cache::for('queue', DAY_IN_SECONDS);
   }
   public function hasProcessingOperations(): bool
@@ -360,13 +359,11 @@
   public function invalidateQueueCache(): void
   {
      $this->cache->delete(self::CACHE_QUEUE_INFO);
      $this->cache->touch();
      $this->cache->forget(self::CACHE_QUEUE_INFO);
   }
   private function invalidateUser(int $userId): void
   {
      CacheManager::invalidateAll("user_{$userId}");
      $this->cache->delete(self::CACHE_QUEUE_INFO);
      $this->cache->forget($userId);
   }
}