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

[Cache] fixed TagAwareAdapter returning invalid cache #33962

Merged
merged 1 commit into from Oct 12, 2019

Conversation

@v-m-i
Copy link
Contributor

v-m-i commented Oct 11, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #33953
License MIT
Doc PR

This PR fixes TagAwareAdapter returning CacheItem when item-tags pair is missing tag key in pool. Currently TagAwareAdapter returns CacheItem with empty tags and isHit set to true. With this PR it returns CacheItem with isHit set to false as we can't know if item is valid or invalid when it's missing tag entry so we treat it as cache miss.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Oct 11, 2019
@v-m-i v-m-i force-pushed the v-m-i:ticket_33953 branch from 93b9d9f to a23b2c3 Oct 12, 2019
@nicolas-grekas nicolas-grekas force-pushed the v-m-i:ticket_33953 branch from a23b2c3 to 946f0a1 Oct 12, 2019
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Oct 12, 2019

Thank you @v-m-i.

nicolas-grekas added a commit that referenced this pull request Oct 12, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fixed TagAwareAdapter returning invalid cache

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33953
| License       | MIT
| Doc PR        |

This PR fixes `TagAwareAdapter` returning `CacheItem` when item-tags pair is missing tag key in pool. Currently `TagAwareAdapter` returns `CacheItem` with empty tags and `isHit` set to `true`. With this PR it returns `CacheItem` with `isHit` set to `false` as we can't know if item is valid or invalid when it's missing tag entry so we treat it as cache miss.

Commits
-------

946f0a1 [Cache] fixed TagAwareAdapter returning invalid cache
@nicolas-grekas nicolas-grekas merged commit 946f0a1 into symfony:3.4 Oct 12, 2019
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details
@v-m-i

This comment has been minimized.

Copy link
Contributor Author

v-m-i commented Oct 12, 2019

@nicolas-grekas You’re welcome

@v-m-i v-m-i deleted the v-m-i:ticket_33953 branch Oct 12, 2019
@v-m-i v-m-i restored the v-m-i:ticket_33953 branch Oct 14, 2019
This was referenced Nov 1, 2019
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.