only write file caches if minutes is greater than zero.

This commit is contained in:
Taylor Otwell
2012-04-18 20:43:25 -05:00
parent 78243fedba
commit 3f2bdb7695
2 changed files with 3 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ class File extends Driver {
*/
public function put($key, $value, $minutes)
{
if ($minutes <= 0) return;
$value = $this->expiration($minutes).serialize($value);
file_put_contents($this->path.$key, $value, LOCK_EX);