Jake Vanderwerf
2026-01-25 b38f03c0e7218762d90fa5092696b127f24f36db
inc/managers/OperationQueue.php
@@ -45,7 +45,7 @@
    ];
   protected ?CacheManager $cache = null;
   protected ?Cache $cache = null;
   protected int $ttl = 300;
   // Cache keys for different data types
   private const CACHE_QUEUE_STATUS = 'status';
@@ -59,7 +59,7 @@
    {
      global $wpdb;
      $this->wpdb = $wpdb;
      $this->cache = CacheManager::for('queue', DAY_IN_SECONDS);
      $this->cache = Cache::for('queue', DAY_IN_SECONDS)->connect('user');
        add_action('jvb_process_queue', [ $this, 'checkQueue' ]);
      add_action('jvb_queue_maintenance', [$this, 'hourlyMaintenance']);
        add_action('jvbEmailDailyMetricsReport', [$this, 'emailDailyMetricsReport']);
@@ -759,8 +759,8 @@
            $this->processOperation($operation);
            // Invalidate operation cache after processing
            $this->cache->delete(self::CACHE_OPERATION_PREFIX . $operation->id);
            $this->cache->delete(self::CACHE_USER_QUEUE_PREFIX . $operation->user_id);
            $this->cache->forget(self::CACHE_OPERATION_PREFIX . $operation->id);
            $this->cache->forget(self::CACHE_USER_QUEUE_PREFIX . $operation->user_id);
         }
         // Batch invalidate caches at the end
@@ -955,7 +955,7 @@
    */
   public function isUserQueueModified(int $user_id, int $since_timestamp): bool
   {
      return $this->cache::getTimestamp("user_{$user_id}") > $since_timestamp;
      return $this->cache::lastModified("user_{$user_id}") > $since_timestamp;
   }
   protected function invalidateUserQueue(int $user_id): void
   {
@@ -963,7 +963,7 @@
      // 1. Updates HTTP timestamp for user_{$user_id}
      // 2. Flushes user-specific caches
      // 3. Triggers connected cache invalidation
      CacheManager::invalidateAll("user_{$user_id}");
      Cache::for($user_id)->flush();
   }
   /**
@@ -985,7 +985,7 @@
      $keys = $cacheKeys[$scope] ?? $cacheKeys['all'];
      foreach ($keys as $key) {
         $this->cache->delete($key);
         $this->cache->forget($key);
      }
      $this->cache->touch();
@@ -1491,7 +1491,7 @@
    protected function updateUserQueueTimestamp(int $user_id)
    {
      CacheManager::updateTimestamp("user_{$user_id}");
      Cache::touch("user_{$user_id}");
    }
   /**