scope api and method to closure

This commit is contained in:
2024-09-13 02:42:52 +02:00
parent 094292a3ec
commit 22df616637

View File

@@ -32,7 +32,7 @@ final class RedmineClient
{
$cacheKey = sprintf('%s_%s_%s', $api, $method, sha1(serialize($arguments)));
return $this->cache->get($cacheKey, function (ItemInterface $item): string {
return $this->cache->get($cacheKey, function (ItemInterface $item) use ($api, $method): array {
$item->expiresAfter(3600);
$item->tag([$api, $method]);