From a9b3b28d001941921aa70d37fdc87c758a163a44 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 05 Jun 2026 16:47:03 +0000
Subject: [PATCH] =Some hefty changes to FeedBlock. Transitioning to loading first page in php to save on extra requests. Got a bit to do yet, but I have to work on Northeh for a bit here.

---
 inc/managers/DashboardManager.php |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/inc/managers/DashboardManager.php b/inc/managers/DashboardManager.php
index 28aa956..395e6c2 100644
--- a/inc/managers/DashboardManager.php
+++ b/inc/managers/DashboardManager.php
@@ -25,10 +25,11 @@
 
     public function __construct()
     {
-        $this->cache = Cache::for('dashboard', WEEK_IN_SECONDS)->connect('user');
+        $this->cache = Cache::for('dashboard', WEEK_IN_SECONDS)->connect('user')->user();
 		if (JVB_TESTING) {
 			$this->cache->flush();
 		}
+
         add_action('init', [$this, 'registerDashboard']);
 
         $this->user = wp_get_current_user();
@@ -44,11 +45,12 @@
 
 		jvb_register_do_once('buildDashboard', [$this, 'activate']);
 
-		add_filter('the_seo_framework_sitemap_exclude_ids', [$this, 'excludeDashboard'], 10, 1);
+		add_filter('the_seo_framework_sitemap_exclude_ids', [$this, 'excludeDashboard'], 8, 1);
     }
 
-	public function excludeDashboard(array $ids):array {
-		$cached = $this->cache->remember(
+	public function excludeDashboard(array $IDs):array {
+		$this->cache->flush();
+		$exclude = $this->cache->remember(
 			'dashboardIDs',
 			function() {
 				return get_posts([
@@ -57,7 +59,11 @@
 					'fields' => 'ids',
 				]);
 			});
-		return array_merge($ids, $cached);
+		if (!empty($exclude)) {
+			$IDs = array_merge($IDs, $exclude);
+		}
+
+		return $IDs;
 	}
 
     /**

--
Gitblit v1.10.0