diff --git a/split-repo.php b/split-repo.php index 5283e3fa..c917ecbd 100644 --- a/split-repo.php +++ b/split-repo.php @@ -5,7 +5,7 @@ return [ 'tag_version' => "0.35.6", 'split_repositorys' => [ - 'sonypradana/Cache' => '/src/System/Cache/', + 'sonypradana/cache' => '/src/System/Cache/', 'sonypradana/collection' => '/src/System/Collection/', 'sonypradana/console' => '/src/System/Console/', 'sonypradana/container' => '/src/System/Container/', diff --git a/src/System/Cache/CacheInterface.php b/src/System/Cache/CacheInterface.php index 7fb8e871..a3701bc9 100644 --- a/src/System/Cache/CacheInterface.php +++ b/src/System/Cache/CacheInterface.php @@ -43,8 +43,10 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable; /** * Persists a set of key => value pairs in the cache, with an optional TTL. + * + * @param iterable $values */ - public function setMultiple(iterable $values, int|\DateInterval|null $ttl = null); + public function setMultiple(iterable $values, int|\DateInterval|null $ttl = null): bool; /** * Deletes multiple cache items in a single operation. diff --git a/src/System/Cache/CacheManager.php b/src/System/Cache/CacheManager.php index b2a0dc75..8f35d684 100644 --- a/src/System/Cache/CacheManager.php +++ b/src/System/Cache/CacheManager.php @@ -42,11 +42,11 @@ public function driver(?string $driver = null): CacheInterface } /** - * @param array $parameters + * @param mixed[] $parameters */ public function __call(string $method, array $parameters): mixed { - return $this->driver()->{$method}($parameters); + return $this->driver()->{$method}(...$parameters); } // --- diff --git a/src/System/Cache/Storage/ArrayStorage.php b/src/System/Cache/Storage/ArrayStorage.php index cd3cfd98..75b354ff 100644 --- a/src/System/Cache/Storage/ArrayStorage.php +++ b/src/System/Cache/Storage/ArrayStorage.php @@ -9,7 +9,7 @@ class ArrayStorage implements CacheInterface { /** - * @var array + * @var array */ protected array $storage = []; diff --git a/src/System/Support/Facades/Cache.php b/src/System/Support/Facades/Cache.php new file mode 100644 index 00000000..162d73a2 --- /dev/null +++ b/src/System/Support/Facades/Cache.php @@ -0,0 +1,28 @@ +