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

docs(cache): improve documentation and cachedFunction default options #1011

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

Atinux
Copy link
Member

@Atinux Atinux commented Mar 3, 2023

❓ 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

Improve a lot the documentation for the Cache API as well as:

  • Making the default group for cachedFunction to nitro/functions
  • Making the second option optional for cachedFunction like cachedEventHandler

Docs preview

πŸ“ Checklist

  • I have updated the documentation accordingly.

@nuxt-studio
Copy link
Contributor

nuxt-studio bot commented Mar 3, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio β†—οΈŽ View Live Preview f1931c8

@Atinux Atinux requested a review from pi0 March 3, 2023 13:16
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Merging #1011 (85c7c06) into main (a615444) will not change coverage.
The diff coverage is n/a.

❗ Current head 85c7c06 differs from pull request most recent head f1931c8. Consider uploading reports for the commit f1931c8 to get more accurate results

@@           Coverage Diff           @@
##             main    #1011   +/-   ##
=======================================
  Coverage   67.66%   67.66%           
=======================================
  Files          60       60           
  Lines        6161     6161           
  Branches      692      692           
=======================================
  Hits         4169     4169           
  Misses       1982     1982           
  Partials       10       10           

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

@pi0 pi0 changed the title chore(cache): improve documentation and cachedFunction default options docs(cache): improve documentation and cachedFunction default options Mar 3, 2023
@manniL manniL self-requested a review March 3, 2023 14:46
) {
opts = { ...defaultCacheOptions, ...opts };

const pending: { [key: string]: Promise<T> } = {};

// Normalize cache params
const group = opts.group || "nitro";
const group = opts.group || "nitro/functions";
Copy link
Member

Choose a reason for hiding this comment

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

This is breaking change as invalidates all current prod deployment namespaces πŸ˜…

@pi0 pi0 merged commit 3b3221b into main Mar 3, 2023
@pi0 pi0 deleted the chore/cache branch March 3, 2023 14:48
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.

None yet

2 participants