mirror of
https://github.com/getgrav/grav.git
synced 2026-02-19 13:07:54 +01:00
Added Cache::setKey() to allow dynamic setting of cache key
This commit is contained in:
@@ -263,6 +263,15 @@ class Cache extends Getters
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter method to set key (Advanced)
|
||||
*/
|
||||
public function setKey($key)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->driver->setNamespace($this->key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to clear all Grav caches
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user