From d353451c795dee24c340c368b73cd398ea31fb05 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 2 Oct 2024 06:55:17 -0400 Subject: [PATCH] clean cachew --- www-api/app/Controllers/WrenchAuth.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www-api/app/Controllers/WrenchAuth.php b/www-api/app/Controllers/WrenchAuth.php index 54f275b6..b67801d8 100644 --- a/www-api/app/Controllers/WrenchAuth.php +++ b/www-api/app/Controllers/WrenchAuth.php @@ -63,6 +63,7 @@ class WrenchAuth extends BaseController $endpoint = "USER_SESSION-". str_pad($out["member_id"], 12, "0", STR_PAD_LEFT) ."-"; log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$endpoint ); $this->saveCache($endpoint,$out,15000); + $this->neatCache($out); }else { log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$fail_endpoint ); @@ -72,6 +73,14 @@ class WrenchAuth extends BaseController return $this->respond( $this->summaryReturnData($in,$out), 200); } + + public function neatCache($in): int{ + // clean up user cache at start + $endpoint = "ACCOUNT_HOMEBANNERS-".str_replace("-", "_", $in["uid"]); + $this->deleteCache($endpoint); + + return 0; + } public function qrLogin(){ $raw_json = file_get_contents('php://input');