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

feat: add shouldBypassCache option to cache utils #874

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

MiniDigger
Copy link
Contributor

@MiniDigger MiniDigger commented Jan 25, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In the spirit of #746, this adds an option to bypass the whole cache logic (so getKey isn't even called), while leaving the existing cache entry untouched. Good for a ?preview param without affecting live, but also certain subpaths you never want cached.

Idk if this needs an issue/discussion, it was easier to implement and test than to start an issue, lol

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Merging #874 (a737bc3) into main (5f142cc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #874   +/-   ##
=======================================
  Coverage   67.42%   67.42%           
=======================================
  Files          59       59           
  Lines        5852     5852           
  Branches      633      633           
=======================================
  Hits         3946     3946           
  Misses       1897     1897           
  Partials        9        9           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Nice addition πŸ‘πŸΌ

@pi0 pi0 merged commit f5a5a8e into unjs:main Jan 25, 2023
@MiniDigger MiniDigger deleted the feat/shouldBypassCache branch January 25, 2023 11:38
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.

2 participants