From 4ca79fa7e67553d1d305ce63a93d76d6a0d686c0 Mon Sep 17 00:00:00 2001 From: Pete Gautier Date: Wed, 18 Oct 2023 16:37:01 -0700 Subject: [PATCH] chore: remove excess logging and fix bin deletion time logic --- src/MomentoCacheBackend.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/MomentoCacheBackend.php b/src/MomentoCacheBackend.php index 20eeeb6..11d65d4 100644 --- a/src/MomentoCacheBackend.php +++ b/src/MomentoCacheBackend.php @@ -120,7 +120,7 @@ public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANEN $this->log("SET response error for bin $this->bin: " . $setResponse->asError()->message()); } else { $this->stopStopwatch( - $start, "SET cid $cid in bin $this->bin with ttl $ttl (real cid = " .$this->getCidForBin($cid) . ")" + $start, "SET cid $cid in bin $this->bin with ttl $ttl" ); } } @@ -261,8 +261,8 @@ private function ensureLastBinDeletionTimeIsSet() { $this->log( "ERROR getting last deletion time for bin $this->bin: " . $getRequest->asError()->message() ); + $this->setLastBinDeletionTime(); } elseif ($getRequest->asMiss()) { - $this->log("Setting last deletion time for $this->bin"); $this->setLastBinDeletionTime(); } else { $this->lastBinDeletionTime = intval($getRequest->asHit()->valueString()); @@ -277,8 +277,6 @@ private function setLastBinDeletionTime() { $this->log( "ERROR getting last deletion time for bin $this->bin: " . $setRequest->asError()->message() ); - } else { - $this->Log("Set last deletion time for $this->bin to $this->lastBinDeletionTime"); } } }