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

Skip to content

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

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
Nov 26, 2018

Conversation

nicolas-grekas
Copy link
Member

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

fabpot commented Nov 26, 2018

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 302b844 into symfony:master Nov 26, 2018
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 contract-metadata branch November 26, 2018 12:46
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
Development

Successfully merging this pull request may close these issues.

3 participants