1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-23 21:33:01 +02:00

feat(core): add new public method delete() #308

This commit is contained in:
Awilum
2019-11-22 22:36:59 +03:00
parent 8236d4ba17
commit b1cfd7f376

View File

@@ -356,6 +356,18 @@ class Cache
$this->driver->save($id, $data, $lifetime);
}
/**
* Delete item from the chache
*/
public function delete(string $id) : void
{
if (! $this->flextype['registry']->get('settings.cache.enabled')) {
return;
}
$this->driver->delete($id);
}
/**
* Clear Cache
*/