diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-05-14 07:22:47 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-14 07:22:47 +0000 |
| commit | 40bdfaf4415ff9f46e63435fc5e61049649802f2 (patch) | |
| tree | f3ae85d9edaef23db555a829571ff968c21f9af5 /lib/classes/SemType.class.php | |
| parent | 636039e25ccc6c33ae758bdb3ddfca4f68327948 (diff) | |
made Stud.IP cache compatible with PSR-6, re #3701
Merge request studip/studip!2570
Diffstat (limited to 'lib/classes/SemType.class.php')
| -rw-r--r-- | lib/classes/SemType.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/classes/SemType.class.php b/lib/classes/SemType.class.php index 2365c4e..5be1f19 100644 --- a/lib/classes/SemType.class.php +++ b/lib/classes/SemType.class.php @@ -68,7 +68,7 @@ class SemType implements ArrayAccess "chdate = UNIX_TIMESTAMP() " . "WHERE id = :id ". ""); - StudipCacheFactory::getCache()->expire('DB_SEM_TYPES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_TYPES_ARRAY'); return $statement->execute([ 'id' => $this->data['id'], 'name' => $this->data['name'], @@ -89,7 +89,7 @@ class SemType implements ArrayAccess DELETE FROM sem_types WHERE id = :id "); - StudipCacheFactory::getCache()->expire('DB_SEM_TYPES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_TYPES_ARRAY'); return $statement->execute([ 'id' => $this->data['id'] ]); @@ -175,7 +175,7 @@ class SemType implements ArrayAccess $db = DBManager::get(); self::$sem_types = []; - $cache = StudipCacheFactory::getCache(); + $cache = \Studip\Cache\Factory::getCache(); $types_array = unserialize($cache->read('DB_SEM_TYPES_ARRAY')); if (!$types_array) { try { @@ -185,7 +185,7 @@ class SemType implements ArrayAccess $statement->execute(); $types_array = $statement->fetchAll(PDO::FETCH_ASSOC); if ($types_array) { - $cache = StudipCacheFactory::getCache(); + $cache = \Studip\Cache\Factory::getCache(); $cache->write('DB_SEM_TYPES_ARRAY', serialize($types_array)); } } catch (PDOException $e) { @@ -210,7 +210,7 @@ class SemType implements ArrayAccess static public function refreshTypes() { self::$sem_types = null; - StudipCacheFactory::getCache()->expire('DB_SEM_TYPES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_TYPES_ARRAY'); return self::getTypes(); } |
