2024-10-02 21:49:51 +02:00
|
|
|
<?php
|
2025-07-26 23:34:58 +02:00
|
|
|
namespace Vichan\Data\Driver\Cache;
|
2024-10-02 21:49:51 +02:00
|
|
|
|
|
|
|
|
defined('TINYBOARD') or exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* No-op cache. Useful for testing.
|
|
|
|
|
*/
|
|
|
|
|
class NoneCacheDriver implements CacheDriver {
|
|
|
|
|
public function get(string $key): mixed {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function set(string $key, mixed $value, mixed $expires = false): void {
|
|
|
|
|
// No-op.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function delete(string $key): void {
|
|
|
|
|
// No-op.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function flush(): void {
|
|
|
|
|
// No-op.
|
|
|
|
|
}
|
|
|
|
|
}
|