Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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