From 6e4798eceb81fe2498074acc3826d3dba5491427 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 27 Jan 2024 13:47:22 +0200 Subject: [PATCH] fix cache --- src/controller/room.php | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/controller/room.php b/src/controller/room.php index 3c91440..625908f 100644 --- a/src/controller/room.php +++ b/src/controller/room.php @@ -559,7 +559,7 @@ class Room $field ], $result, - $cache + $cache + time() ); $this->_memory->set( @@ -568,10 +568,10 @@ class Room $namespace, $key, $field, - $time + 'time' ], $time, - $cache + $cache + time() ); return $result; @@ -840,7 +840,7 @@ class Room $namespace ], $result, - $cache + $cache + time() ); return $result; @@ -870,7 +870,7 @@ class Room $namespace ], $record['displayName'], - $cache + $cache + time() ); return $record['displayName']; @@ -890,7 +890,7 @@ class Room $namespace ], $record['value'], - $cache + $cache + time() ); return $record['value']; @@ -903,13 +903,6 @@ class Room private function _pending(): array { - // Check for cache - if ($result = $this->_memory->get([__METHOD__])) - { - return $result; - } - - // Get pending posts $result = []; foreach ((array) $this->_kevacoin->kevaPending() as $pending) @@ -935,14 +928,6 @@ class Room $result[] = $pending; } - // Save to cache - $this->_memory->set( - [ - __METHOD__ - ], - $result - ); - return $result; }