Skip to content

Commit eb60f59

Browse files
authored
Update src/Memcache.php
1 parent a583758 commit eb60f59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Memcache.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ public function __construct(\Memcache $client, bool $refresh = false)
4242
* @param string $key
4343
* @param callable $compute
4444
* @param int|null $cacheTime
45+
* @param bool $refresh
4546
*
4647
* @return mixed
4748
*/
48-
public function memoizeCallable(string $key, callable $compute, int $cacheTime = null)
49+
public function memoizeCallable(string $key, callable $compute, int $cacheTime = null, bool $refresh = false)
4950
{
50-
if (!$this->refresh) {
51+
if (!$this->refresh && !$refresh) {
5152
try {
5253
$cached = $this->client->get($key, $flags, $flags);
5354
if ($cached !== false && $cached != null) {

0 commit comments

Comments
 (0)