8000 [Cache] Fix default lifetime being ignored by nicolas-grekas · Pull Request #19442 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Fix default lifetime being ignored #19442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2016

Conversation

nicolas-grekas
Copy link
Member
Q A
Branch? 3.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets symfony/cache#1
License MIT
Doc PR -

Courtesy of @ecanovas

@@ -53,7 +53,7 @@ function ($deferred, $namespace, &$expiredIds) {

foreach ($deferred as $key => $item) {
if (null === $item->expiry) {
$byLifetime[0][$namespace.$key] = $item->value;
$byLifetime[0 < $item->defaultLifetime ? $item->defaultLifetime : 0][$namespace.$key] = $item->value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe max(0, $item->defaultLifetime) would be more readable? Maybe it's not a good idea because it implies a function call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's save a function call yes

@nicolas-grekas nicolas-grekas merged commit 35ba478 into symfony:3.1 Jul 28, 2016
nicolas-grekas added a commit that referenced this pull request Jul 28, 2016
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix default lifetime being ignored

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

Courtesy of @ecanovas

Commits
-------

35ba478 [Cache] Fix default lifetime being ignored
@nicolas-grekas nicolas-grekas deleted the cache-default-lifetime branch July 28, 2016 06:50
@fabpot fabpot mentioned this pull request Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0