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] fix #38796 - fix inconsistent handling of empty byte[] #47491

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

mgravell
Copy link
Member

fix inconsistent handling of empty byte[]

As per #38796, handling of empty byte[] is inconsistent in redis cache, with Get returning null; this PR fixes this

Description

RedisValue.HasValue is effectively "not null or empty"; we just want to test "not null"; so: use that

Fixes #38796

(tests executed successfully locally)

…t to test "not null"

(tests executed successfully locally)
@mgravell mgravell added the feature-caching Includes: StackExchangeRedis and SqlServer distributed caches label Mar 30, 2023
@mgravell mgravell self-assigned this Mar 30, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Mar 30, 2023
@mgravell mgravell added area-runtime and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Mar 30, 2023
@mgravell mgravell added this to the 8.0-preview4 milestone Mar 30, 2023
@mgravell mgravell merged commit 83728ca into main Mar 30, 2023
@mgravell mgravell deleted the marc/issue38796 branch March 30, 2023 16:54
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares feature-caching Includes: StackExchangeRedis and SqlServer distributed caches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix inconsistent cache behavior for empty buffers
3 participants