diff --git a/src/sammo/KVStorage.php b/src/sammo/KVStorage.php index b6db4eff..2e52073e 100644 --- a/src/sammo/KVStorage.php +++ b/src/sammo/KVStorage.php @@ -26,6 +26,7 @@ class KVStorage{ $this->db = $db; $this->storNamespace = $storNamespace; $this->tableName = $tableName; + $this->turnOnCache(); } public static function getValuesFromInterNamespace(\MeekroDB $db, string $tableName, $key):array{ @@ -58,6 +59,13 @@ class KVStorage{ return $this; } + public function turnOffCache(): self{ + if($this->cacheData !== null){ + $this->cacheData = null; + } + return $this; + } + public function resetCache(bool $disableCache=true):self{ if($disableCache){ $this->cacheData = null;