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

Skip to content

[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

Merged
merged 2 commits into from
Mar 27, 2016
Merged

[Cache] Add a Chain adapter #18215

merged 2 commits into from
Mar 27, 2016

Conversation

nicolas-grekas
Copy link
Member

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

@nicolas-grekas
Copy link
Member Author

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.
Copy link
Member

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.

@nicolas-grekas nicolas-grekas force-pushed the chain_cache branch 4 times, most recently from f270645 to affe749 Compare March 17, 2016 10:31

if ($item->isHit()) {
while (0 <= --$i) {
$saveUp($this->adapters[$i], $item);
Copy link
Contributor

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 ?

Copy link
Member Author

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...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, thx

@nicolas-grekas
Copy link
Member Author

ping @symfony/deciders

@dunglas
Copy link
Member

dunglas commented Mar 27, 2016

👍


/**
* @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.
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

@fabpot
Copy link
Member

fabpot commented Mar 27, 2016

👍

@fabpot
Copy link
Member

fabpot commented Mar 27, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 68d9cea into symfony:master Mar 27, 2016
fabpot added a commit that referenced this pull request Mar 27, 2016
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
@nicolas-grekas nicolas-grekas deleted the chain_cache branch March 30, 2016 06:44
@fabpot fabpot mentioned this pull request May 13, 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.

6 participants