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/SemClass.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/SemClass.class.php')
| -rw-r--r-- | lib/classes/SemClass.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/classes/SemClass.class.php b/lib/classes/SemClass.class.php index 63be920..2a038e2 100644 --- a/lib/classes/SemClass.class.php +++ b/lib/classes/SemClass.class.php @@ -389,7 +389,7 @@ class SemClass implements ArrayAccess "chdate = UNIX_TIMESTAMP() " . "WHERE id = :id ". ""); - StudipCacheFactory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); return $statement->execute([ 'id' => $this->data['id'], 'name' => $this->data['name'], @@ -453,7 +453,7 @@ class SemClass implements ArrayAccess DELETE FROM sem_classes WHERE id = :id "); - StudipCacheFactory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); return $statement->execute([ 'id' => $this->data['id'] ]); @@ -552,7 +552,7 @@ class SemClass implements ArrayAccess $db = DBManager::get(); self::$sem_classes = []; - $cache = StudipCacheFactory::getCache(); + $cache = \Studip\Cache\Factory::getCache(); $class_array = unserialize($cache->read('DB_SEM_CLASSES_ARRAY')); if (!$class_array) { @@ -564,7 +564,7 @@ class SemClass implements ArrayAccess $class_array = $statement->fetchAll(PDO::FETCH_ASSOC); if ($class_array) { - $cache = StudipCacheFactory::getCache(); + $cache = \Studip\Cache\Factory::getCache(); $cache->write('DB_SEM_CLASSES_ARRAY', serialize($class_array)); } } catch (PDOException $e) { @@ -593,7 +593,7 @@ class SemClass implements ArrayAccess */ static public function refreshClasses() { - StudipCacheFactory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); + \Studip\Cache\Factory::getCache()->expire('DB_SEM_CLASSES_ARRAY'); self::$sem_classes = null; return self::getClasses(); } |
