From 6110744a00d28db84216ceb5313fbb10fe7b5609 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 11 Feb 2026 01:21:24 +0000
Subject: [PATCH] =UploadExecutor processAttachToContent fix

---
 inc/managers/queue/Storage.php |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/inc/managers/queue/Storage.php b/inc/managers/queue/Storage.php
index 99cd8c3..add78a5 100644
--- a/inc/managers/queue/Storage.php
+++ b/inc/managers/queue/Storage.php
@@ -138,6 +138,9 @@
 			return false;
 		}
 
+
+		$this->invalidateUser($op->userId);
+
 		return true;
 	}
 
@@ -172,7 +175,6 @@
 		];
 
 		$updated = $wpdb->update($table, $data, $where);
-		$this->invalidateQueueCache();
 
 		if ($updated === 0) {
 			return true;
@@ -182,6 +184,8 @@
 			error_log('[Storage::saveFinal] DB error: ' . $wpdb->last_error);
 			return false;
 		}
+		$this->invalidateQueueCache();
+		$this->invalidateUser($op->userId);
 
 		return true;
 	}
@@ -239,6 +243,8 @@
 			$type, $userId
 		));
 
+		$this->invalidateUser($userId);
+
 		return $row ? $this->rowToOperation($row) : null;
 	}
 
@@ -442,7 +448,7 @@
 
 	private function invalidateUser(int $userId): void
 	{
-		$this->cache->forget($userId);
+		Cache::for($userId.'_queue')->flush();
 	}
 	public function getLastError(): string
 	{

--
Gitblit v1.10.0