Skip to content

Commit

Permalink
Merge pull request #73 from mingyoung/patch-2
Browse files Browse the repository at this point in the history
Add permanent cache.
  • Loading branch information
overtrue committed Feb 20, 2017
2 parents 8701115 + 5e4205a commit b9030e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CacheBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public function contains($id)
*/
public function save($id, $data, $lifeTime = 0)
{
if ($lifeTime == 0) {
return Cache::forever($id, $data);
}

return Cache::put($id, $data, $lifeTime / 60);
}

Expand Down

0 comments on commit b9030e6

Please sign in to comment.