2023-07-06 16:10:30 +03:00
|
|
|
See `CacheInterface`.
|
2022-03-22 23:33:29 +03:00
|
|
|
|
2023-07-06 16:10:30 +03:00
|
|
|
```php
|
|
|
|
interface CacheInterface
|
|
|
|
{
|
2023-09-10 22:50:15 +03:00
|
|
|
public function get(string $key, $default = null);
|
2022-03-22 23:33:29 +03:00
|
|
|
|
2023-09-10 22:50:15 +03:00
|
|
|
public function set(string $key, $value, int $ttl = null): void;
|
2022-03-22 23:33:29 +03:00
|
|
|
|
2023-09-10 22:50:15 +03:00
|
|
|
public function delete(string $key): void;
|
2022-03-22 23:33:29 +03:00
|
|
|
|
2023-09-10 22:50:15 +03:00
|
|
|
public function clear(): void;
|
2022-03-22 23:33:29 +03:00
|
|
|
|
2023-09-10 22:50:15 +03:00
|
|
|
public function prune(): void;
|
2022-03-22 23:33:29 +03:00
|
|
|
}
|
2023-09-10 22:50:15 +03:00
|
|
|
```
|