-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Add a Chain adapter #18215
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
[Cache] Add a Chain adapter #18215
Conversation
fabbot failure is a false positive (and a fabbot bug) |
use Psr\Cache\CacheItemPoolInterface; | ||
|
||
/** | ||
* Marker interface for adapters managing {@see \Symfony\Component\Cache\CacheItem} instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand this description:
Marker interface for adapters managing instances.
f270645
to
affe749
Compare
affe749
to
68d9cea
Compare
|
||
if ($item->isHit()) { | ||
while (0 <= --$i) { | ||
$saveUp($this->adapters[$i], $item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolas-grekas I don't understand why you save the item with a new lifetime for a fetch operation. Can you explain it to me plz ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because there is no way to know the remaining lifetime of the item in its original pool...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thx
ping @symfony/deciders |
👍 |
|
||
/** | ||
* @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items. | ||
* @param int $maxLifetime The max lifetime of items propagated from lower adapters to upper ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dots at the end of @param lines should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 |
Thank you @nicolas-grekas. |
This PR was merged into the 3.1-dev branch. Discussion ---------- [Cache] Add a Chain adapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #17556 | License | MIT | Doc PR | - Made in coordination with @dunglas Commits ------- 68d9cea [Cache] Optimize Chain adapter ebdcd16 [Cache] Add a Chain adapter
Made in coordination with @dunglas