From d7e7d248cbe41cd7a9ef9c2fb022b6c4831f99a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 31 May 2026 15:22:56 +0000
Subject: [PATCH] =jakevan complete

---
 inc/managers/OperationQueue.php |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/inc/managers/OperationQueue.php b/inc/managers/OperationQueue.php
index 047a948..3b93ccf 100644
--- a/inc/managers/OperationQueue.php
+++ b/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}");
     }
 
 	/**

--
Gitblit v1.10.0