Skip to content

Commit b202d2f

Browse files
committed
refactor: remove duplicate remember and rememberForever methods from RedisStore
1 parent 20372ab commit b202d2f

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/Cache/Stores/RedisStore.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,6 @@ public function forever(string $key, mixed $value): void
4444
$this->client->execute('SET', $this->getPrefixedKey($key), $value);
4545
}
4646

47-
public function remember(string $key, Date $ttl, Closure $callback): mixed
48-
{
49-
$value = $this->get($key);
50-
51-
if ($value !== null) {
52-
return $value;
53-
}
54-
55-
$value = $callback();
56-
57-
$this->set($key, $value, $ttl);
58-
59-
return $value;
60-
}
61-
62-
public function rememberForever(string $key, Closure $callback): mixed
63-
{
64-
$value = $this->get($key);
65-
66-
if ($value !== null) {
67-
return $value;
68-
}
69-
70-
$value = $callback();
71-
72-
$this->forever($key, $value);
73-
74-
return $value;
75-
}
76-
7747
public function has(string $key): bool
7848
{
7949
return $this->client->execute('EXISTS', $this->getPrefixedKey($key)) === 1;

0 commit comments

Comments
 (0)