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/utility/Video.php |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/inc/utility/Video.php b/inc/utility/Video.php
index f71c050..0feffeb 100644
--- a/inc/utility/Video.php
+++ b/inc/utility/Video.php
@@ -15,12 +15,8 @@
 
 	public function __construct()
 	{
-		$this->cache = Cache::for('videos')->connect('post');
-		$this->vidData = Cache::for('vidData')->connect('post');
-		if (JVB_TESTING) {
-			$this->cache->flush();
-			$this->vidData->flush();
-		}
+		$this->cache = Cache::for('videos', 'post');
+		$this->vidData = Cache::for('vidData', 'post');
 	}
 	public static function get(int $ID, array $args = []):string
 	{
@@ -29,7 +25,7 @@
 	public function formatVideo(int $ID, array $args = []):string
 	{
 		return $this->cache->remember(
-			$this->cache->generateKey(array_merge(['id' => $ID], $args)),
+			array_merge(['id' => $ID], $args),
 			function() use ($ID, $args) {
 				$url = wp_get_attachment_url($ID);
 				$meta = wp_get_attachment_metadata($ID);

--
Gitblit v1.10.0