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:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user