From b38f03c0e7218762d90fa5092696b127f24f36db Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 25 Jan 2026 07:07:26 +0000
Subject: [PATCH] =Some logical flaws in Queue.php, Queue.js, ContentExecutor.php, UploadExecutor.php - particularly with timeline ordering, frontend queue updates, etc
---
inc/helpers/time.php | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/inc/helpers/time.php b/inc/helpers/time.php
index 6f94c49..7670726 100644
--- a/inc/helpers/time.php
+++ b/inc/helpers/time.php
@@ -1,6 +1,6 @@
<?php
-use JVBase\managers\CacheManager;
+use JVBase\managers\Cache;
if (!defined('ABSPATH')) {
exit;
@@ -141,18 +141,18 @@
*/
function jvbRenderHours(int $ID, JVBase\Meta\MetaManager $meta):string
{
- $cache = CacheManager::for('hours-'.$ID, WEEK_IN_SECONDS)->connectTo('taxonomy');
- $key = 'hours_display';
- $cached = $cache->get($key);
+ $cache = Cache::for('hours_display', WEEK_IN_SECONDS)->connect('taxonomy')->connect('post')->connect('user');
+
+ $cached = $cache->get($ID);
if ($cached !== false) {
return $cached;
}
if (!$meta) {
- if (term_exists((int)$ID)) {
+ if (term_exists($ID)) {
$type = 'term';
- } elseif (get_post_status((int)$ID)) {
+ } elseif (get_post_status($ID)) {
$type = 'post';
} else {
$type = 'user';
@@ -185,7 +185,7 @@
$out .= '<p class="hours-notes"><small>' . implode(' • ', $notes) . '</small></p>';
}
- $cache->set($key, $out);
+ $cache->set($ID, $out);
return $out;
}
--
Gitblit v1.10.0