Skip to content
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

[Contracts][Cache] allow retrieving metadata of cached items #29302

Merged
merged 1 commit into from Nov 26, 2018

Conversation

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Nov 24, 2018

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

We added ItemInterface::getMetadata() because getting them in userland is useful to propagate to higher level caches (eg sending tags + remaining ttl to Varnish).
But we forgot to add a way to retrieve them when using the new CacheInterface::get().
This PR fixes it by adding a 4th &$metadata to the method.

@fabpot
fabpot approved these changes Nov 26, 2018
@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Nov 26, 2018

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 302b844 into symfony:master Nov 26, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
fabpot added a commit that referenced this pull request Nov 26, 2018
…ms (nicolas-grekas)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts][Cache] allow retrieving metadata of cached items

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

We added `ItemInterface::getMetadata()` because getting them in userland is useful to propagate to higher level caches (eg sending tags + remaining ttl to Varnish).
But we forgot to add a way to retrieve them when using the new `CacheInterface::get()`.
This PR fixes it by adding a 4th `&$metadata` to the method.

Commits
-------

302b844 [Contracts][Cache] allow retrieving metadata of cached items
@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:contract-metadata branch Nov 26, 2018
This was referenced Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.