X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=lib%2FAPI%2FCall%2FCache%2FService%2FHollow.php;h=dd81ba352ecaf5b6615901aa01b59b0f6c79df74;hp=47175ff20e3e3b6070104035f21215d233fcce5f;hb=HEAD;hpb=2451d97f1cb7b97e445b4dd839835b8673a4d0fc diff --git a/lib/API/Call/Cache/Service/Hollow.php b/lib/API/Call/Cache/Service/Hollow.php index 47175ff..dd81ba3 100644 --- a/lib/API/Call/Cache/Service/Hollow.php +++ b/lib/API/Call/Cache/Service/Hollow.php @@ -5,9 +5,8 @@ namespace seekat\API\Call\Cache\Service; use http\Client\Response; use seekat\API\Call\Cache\Service; -final class Hollow implements Service -{ - private $storage = []; +final class Hollow implements Service { + private array $storage = []; public function fetch(string $key, Response &$response = null) : bool { if (isset($this->storage[$key])) { @@ -22,7 +21,11 @@ final class Hollow implements Service return true; } - public function clear() { + public function del(string $key) : void { + unset($this->storage[$key]); + } + + public function clear() : void { $this->storage = []; }