From 7cde69437ed0288898dfd8fa16ed8d9c6de68850 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 2 Jul 2026 03:22:01 +1200 Subject: [PATCH] refactor(cache): narrow leaseRun to private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only saveWithLease and purge call it, both inside Leasable — no concrete adapter needs to call or override it, so private keeps the EVALSHA→EVAL contract from leaking into the extension surface. Addresses review. Co-Authored-By: Claude Opus 4.8 --- src/Cache/Adapter/Redis/Leasable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cache/Adapter/Redis/Leasable.php b/src/Cache/Adapter/Redis/Leasable.php index 89b6446910..94865fbc22 100644 --- a/src/Cache/Adapter/Redis/Leasable.php +++ b/src/Cache/Adapter/Redis/Leasable.php @@ -199,7 +199,7 @@ abstract class Leasable implements \Utopia\Cache\Feature\Leasable * * @param array $args */ - protected function leaseRun(string $script, string $key, array $args): mixed + private function leaseRun(string $script, string $key, array $args): mixed { try { return $this->leaseEvalSha($this->shaFor($script), $key, $args);