diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:10:49 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 19:10:49 +0000 |
| commit | 7fbf01fafcbc022831e9717a892a084b3c6e6e59 (patch) | |
| tree | 7520a5af1ba8bffc5664544fd3c76cdff4c33de4 /lib/classes/cache/DbCache.class.php | |
| parent | eb4f3bba75580ee1bd04e2b6677028ff28e6a1af (diff) | |
update psr/cache to 3.0.0 and adjust everything necessary, fixes #4152
Closes #4152
Merge request studip/studip!2992
Diffstat (limited to 'lib/classes/cache/DbCache.class.php')
| -rw-r--r-- | lib/classes/cache/DbCache.class.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/classes/cache/DbCache.class.php b/lib/classes/cache/DbCache.class.php index 3361af0..c7abef2 100644 --- a/lib/classes/cache/DbCache.class.php +++ b/lib/classes/cache/DbCache.class.php @@ -3,6 +3,7 @@ namespace Studip\Cache; use DBManager; +use Psr\Cache\CacheItemInterface; /** * StudipCache implementation using database table @@ -88,7 +89,7 @@ class DbCache extends Cache /** * @inheritDoc */ - public function getItem($key) + public function getItem(string $key): CacheItemInterface { $query = "SELECT `content`, `expires` FROM `cache` @@ -114,7 +115,7 @@ class DbCache extends Cache /** * @inheritDoc */ - public function hasItem($key) + public function hasItem(string $key): bool { $query = "SELECT 1 FROM `cache` @@ -126,7 +127,7 @@ class DbCache extends Cache /** * @inheritDoc */ - public function save(\Psr\Cache\CacheItemInterface $item) + public function save(CacheItemInterface $item): bool { $expiration = $this->getExpiration($item); if ($expiration < 1) { |
