Skip to content

fix: keep proxy-cache different strategy response header consistency#11048

Merged
juststillthinking merged 13 commits into
apache:masterfrom
theweakgod:fix/proxy_cache_memory_not_found_return_miss
Mar 18, 2024
Merged

fix: keep proxy-cache different strategy response header consistency#11048
juststillthinking merged 13 commits into
apache:masterfrom
theweakgod:fix/proxy_cache_memory_not_found_return_miss

Conversation

@theweakgod

@theweakgod theweakgod commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

Description

Fixes #11045
keep proxy-cache different strategy response header consistency

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

if err ~= "not found" then
if err == "expired" then
core.response.set_header("Apisix-Cache-Status", "EXPIRED")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you remove these empty lines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I decided to write this after seeing the example of CODE_STYLE.
blank-line

@Revolyssup
Revolyssup self-requested a review March 18, 2024 06:22
@juststillthinking
juststillthinking merged commit c7d1587 into apache:master Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: proxy-cache inconsistent behaviours for in-memory and on-disk caching when the cache expires

3 participants