Skip to content

Commit

Permalink
less than one min for redis cache (#13810)
Browse files Browse the repository at this point in the history
  • Loading branch information
halaei authored and taylorotwell committed Jun 1, 2016
1 parent 550fe25 commit 46d5d14
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Cache/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ public function put($key, $value, $minutes)
{
$value = is_numeric($value) ? $value : serialize($value);

$minutes = max(1, $minutes);

$this->connection()->setex($this->prefix.$key, $minutes * 60, $value);
$this->connection()->setex($this->prefix.$key, (int) max(1, $minutes * 60), $value);
}

/**
Expand Down

0 comments on commit 46d5d14

Please sign in to comment.