1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-22 19:32:04 +01:00

continued 7.4 backwards compatibility

This commit is contained in:
Lorenzo Yario 2024-12-22 14:37:22 -06:00 committed by GitHub
parent 32f0cb3a5f
commit c94ab113de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,20 +1,20 @@
<?php <?php
namespace Vichan\Data\Driver; namespace Vichan\Data\Driver;
defined('TINYBOARD') or exit;
defined('TINYBOARD') or exit;
/** /**
* A simple process-wide PHP array. * A simple process-wide PHP array.
*/ */
class ArrayCacheDriver implements CacheDriver { class ArrayCacheDriver implements CacheDriver {
private static array $inner = []; private static $inner = [];
public function get(string $key): mixed { public function get(string $key) {
return isset(self::$inner[$key]) ? self::$inner[$key] : null; return isset(self::$inner[$key]) ? self::$inner[$key] : null;
} }
public function set(string $key, mixed $value, mixed $expires = false): void { public function set(string $key, $value, $expires = false): void {
self::$inner[$key] = $value; self::$inner[$key] = $value;
} }