From 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Aug 2026 22:57:22 +0000
Subject: [PATCH] =It's been a minute. I went through the Routes and associated Managers and ensured they played together well. Reworked the Cache.php, and I think I caught all the references. Moving away from JVBase() root class, to individuall classes that are Instanced. Double checked for the ABSPATH check in every file, and added index.php to every directory that didn't already have it. Also still working on the MenuBlock to work with WooCommerce for now for Northeh

---
 inc/helpers/members.php |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/inc/helpers/members.php b/inc/helpers/members.php
index b64c9d0..1052d26 100644
--- a/inc/helpers/members.php
+++ b/inc/helpers/members.php
@@ -1,6 +1,7 @@
 <?php
 
 use JVBase\managers\Cache;
+use JVBase\managers\Roles;
 use JVBase\meta\Meta;
 use JVBase\registrar\Registrar;
 
@@ -17,7 +18,7 @@
  */
 function jvbShareName(int $userID):string
 {
-    $cache = Cache::for('usernames')->connect('user');
+    $cache = Cache::for('usernames', 'user');
 	return $cache->remember(
 		$userID,
 		function() use ($userID) {
@@ -34,7 +35,7 @@
  */
 function jvbGetUserByFirstName(string $first_name):WP_User|false
 {
-    $cache = Cache::for('userFirstname')->connect('user', true);
+    $cache = Cache::for('userFirstname', 'user');
 	return $cache->remember(
 		$first_name,
 		function() use ($first_name) {
@@ -74,7 +75,7 @@
  */
 function jvbGetUserByDisplayName(string $display_name):WP_User|false
 {
-    $cache = Cache::for('displayNames')->connect('user', true);
+    $cache = Cache::for('displayNames', 'user');
     $cached = $cache->get($display_name)??false;
 
     if ($cached && is_int($cached)) {
@@ -113,7 +114,7 @@
 function jvbGetUsername(int $user_id):string
 {
     $key = 'user_display_names';
-    $cache = Cache::for('userNames', WEEK_IN_SECONDS)->connect('user');
+    $cache = Cache::for('userNames', 'user',WEEK_IN_SECONDS);
     $cached = $cache->get($user_id);
 
     if ($cached) {
@@ -154,7 +155,7 @@
         return false;
     }
 
-    $cache = Cache::for('artist', 3600)->connect('post');
+    $cache = Cache::for('artist', 'post', 3600);
 	$cached = $cache->get($userID);
 	if ($cached) {
 		return match ($return) {
@@ -222,7 +223,7 @@
 
 function  jvbUserProfileLink(int $userID):string|false
 {
-	$cache = Cache::for('userLink')->connect('user');
+	$cache = Cache::for('userLink', 'user');
 	return $cache->remember(
 		$userID,
 		function() use ($userID) {
@@ -238,7 +239,7 @@
 			$link = get_user_meta($userID, BASE.'profile_link', true);
 			//Try to create it
 			if (empty($link)) {
-				$link = JVB()->roles()->addUserLink($user, $role);
+				$link = Roles::getInstance()()->addUserLink($user, $role);
 				if (!$link) {
 					return false;
 				}

--
Gitblit v1.10.0