Skip to content

Commit

Permalink
Do not use timestamp. Expiration can't exceed 30 days.
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-montanez committed Jul 8, 2014
1 parent 98498d3 commit 24eed5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Service/MemcachedService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ protected function calculateTime($expiration = 0)
{
if ($expiration = 0) {
return 0;
}

$date = new DateTime();
$date->modify('+' . $expiration . ' minutes');
} else if (($expiration * 60) >= 2592000) {
return 0;
}

return $date->getTimestamp();
return ($expiration * 60);
}
}

0 comments on commit 24eed5a

Please sign in to comment.