From ccf5e61a075c35d24befc175994b5cb8957ca322 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 26 Aug 2026 21:45:53 +0000
Subject: [PATCH] =Extra JVB() calls replaced, minor tweaks

---
 inc/rest/routes/ContentRoutes.php |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/inc/rest/routes/ContentRoutes.php b/inc/rest/routes/ContentRoutes.php
index 7d5ef42..8f5f5de 100644
--- a/inc/rest/routes/ContentRoutes.php
+++ b/inc/rest/routes/ContentRoutes.php
@@ -49,9 +49,7 @@
 		$this->termCache->user();
 
 
-		if (JVB_TESTING) {
-			$this->cache->flush();
-		}
+
 		add_action('init', [$this, 'registerContentExecutors'], 5);
 	}
 
@@ -279,8 +277,8 @@
 			$args['s'] = sanitize_text_field($params['search']);
 		}
 
-		$key = $this->cache->generateKey($args);
-		$cached = $this->cache->get($key);
+
+		$cached = $this->cache->get($args);
 		if ($cached) {
 			return $cached;
 		}
@@ -308,7 +306,7 @@
 		];
 
 
-		$this->cache->set($key, $data);
+		$this->cache->set($args, $data);
 
 		return Response::success($data);
 	}
@@ -343,14 +341,14 @@
 			$args['s'] = sanitize_text_field($params['search']);
 		}
 
-		$key = $this->cache->generateKey($args);
+
 		// Check HTTP cache headers with the specific content type
 //		$cache_check = $this->checkHeaders($request, $key);
 //		if ($cache_check) {
 //			return $cache_check;
 //		}
 
-		$cache = $this->cache->get($key);
+		$cache = $this->cache->get($args);
 		if ($cache) {
 			return Response::success($cache);
 		}
@@ -389,7 +387,7 @@
 		$this->taxonomies = [];
 		$data['items'] =array_map([$this, 'prepareTerm'], $terms);
 
-		$this->cache->set($key, $data);
+		$this->cache->set($args, $data);
 
 		return Response::success($data);
 	}

--
Gitblit v1.10.0