WIP ConstructionConsent & update-statusflags script
This commit is contained in:
@@ -23,6 +23,7 @@ class mfValuecache {
|
||||
|
||||
public function set($key, $value) {
|
||||
$this->cache[$key] = $value;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCache() {
|
||||
@@ -31,6 +32,27 @@ class mfValuecache {
|
||||
|
||||
public function delete($key) {
|
||||
unset($this->cache[$key]);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function purge($beginning = "", $casesensitive = true) {
|
||||
if(!$beginning) {
|
||||
$this->cache = [];
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach($this->cache as $key => $value) {
|
||||
if(!$casesensitive) {
|
||||
if(strpos(strtolower($key), strtolower($beginning)) === 0) {
|
||||
unset($this->cache[$key]);
|
||||
}
|
||||
}
|
||||
if(strpos($key, $beginning) === 0) {
|
||||
unset($this->cache[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getMfObject($objectname, $id) {
|
||||
|
||||
Reference in New Issue
Block a user