Skip to content

Commit f80f16a

Browse files
committed
Cache: used native callback invocation
1 parent d84d532 commit f80f16a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Caching/Cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function call($function)
271271
$key[0][0] = get_class($function[0]);
272272
}
273273
return $this->load($key, function () use ($function, $key) {
274-
return Callback::invokeArgs($function, array_slice($key, 1));
274+
return $function(...array_slice($key, 1));
275275
});
276276
}
277277

@@ -289,7 +289,7 @@ public function wrap($function, array $dependencies = null): \Closure
289289
}
290290
$data = $this->load($key);
291291
if ($data === null) {
292-
$data = $this->save($key, Callback::invokeArgs($function, $key[1]), $dependencies);
292+
$data = $this->save($key, $function(...$key[1]), $dependencies);
293293
}
294294
return $data;
295295
};

0 commit comments

Comments
 (0)