chore: complete update
This commit is contained in:
18
src/Framework/Cache/Cache.php
Normal file
18
src/Framework/Cache/Cache.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Framework\Cache;
|
||||
|
||||
interface Cache
|
||||
{
|
||||
public function get(string $key): CacheItem;
|
||||
public function set(string $key, mixed $value, ?int $ttl = null): bool;
|
||||
public function has(string $key): bool;
|
||||
public function forget(string $key): bool;
|
||||
public function clear(): bool;
|
||||
|
||||
/**
|
||||
* Führt Callback aus, wenn Wert nicht im Cache ist ("Remember"-Pattern)
|
||||
* und cached das Ergebnis für die gewünschte Zeit
|
||||
*/
|
||||
public function remember(string $key, callable $callback, int $ttl = 3600): CacheItem;
|
||||
}
|
||||
Reference in New Issue
Block a user