WIP ConstructionConsent & update-statusflags script

This commit is contained in:
Frank Schubert
2024-12-18 19:49:18 +01:00
parent 0e6489ce20
commit 9c73bf4faf
7 changed files with 264 additions and 21 deletions

View File

@@ -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) {