Skip to content

Commit b9030e6

Browse files
authored
Merge pull request #73 from mingyoung/patch-2
Add permanent cache.
2 parents 8701115 + 5e4205a commit b9030e6

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)