Skip to content

Commit 5e4205a

Browse files
authored
Add permanent cache.
Store an item in the cache permanently.
1 parent 8701115 commit 5e4205a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CacheBridge.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public function contains($id)
4949
*/
5050
public function save($id, $data, $lifeTime = 0)
5151
{
52+
if ($lifeTime == 0) {
53+
return Cache::forever($id, $data);
54+
}
55+
5256
return Cache::put($id, $data, $lifeTime / 60);
5357
}
5458

0 commit comments

Comments
 (0)