Skip to content

Commit

Permalink
bug #19435 [Cache] Fix incorrect timestamps generated by FilesystemAd…
Browse files Browse the repository at this point in the history
…apter (nicolas-grekas)

This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix incorrect timestamps generated by FilesystemAdapter

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19431
| License       | MIT
| Doc PR        | -

Commits
-------

bd2e795 [Cache] Fix incorrect timestamps generated by FilesystemAdapter
  • Loading branch information
nicolas-grekas committed Jul 27, 2016
2 parents 3a57de1 + bd2e795 commit 26dfa2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php
Expand Up @@ -126,7 +126,7 @@ protected function doDelete(array $ids)
protected function doSave(array $values, $lifetime)
{
$ok = true;
$expiresAt = $lifetime ? time() + $lifetime : PHP_INT_MAX;
$expiresAt = time() + ($lifetime ?: 31557600); // 31557600s = 1 year
$tmp = $this->directory.uniqid('', true);

foreach ($values as $id => $value) {
Expand Down

0 comments on commit 26dfa2f

Please sign in to comment.