KVStorage에 reset추가
This commit is contained in:
@@ -30,6 +30,13 @@ class KVStorage{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function resetValues():self{
|
||||
if($this->cacheData !== null){
|
||||
$this->cacheData = [];
|
||||
}
|
||||
return $this->resetDBNamespace();
|
||||
}
|
||||
|
||||
public function invalidateCacheValue($key):self{
|
||||
if($this->cacheData === null){
|
||||
return $this;
|
||||
@@ -215,4 +222,12 @@ class KVStorage{
|
||||
]);
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function resetDBNamespace():self{
|
||||
$db = DB::db();
|
||||
$db->delete('storage', [
|
||||
'namespace'=>$this->storNamespace
|
||||
]);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user