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

feature: Coalesce reset options, reset coalesce based on result. (error, success, timeout) #908

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

daan944
Copy link
Contributor

@daan944 daan944 commented Nov 20, 2024

After implementing coalescing in our software, we noticed it would be handy to better finetune coalescion behavior.

So added the option to reset coalescion cache at different stages: error, success, timeout. This can be used as sometimes you'd like to retry after an error/timeout, or would like to limit cache TTL without limiting coalescion TTL (e.g. a slow action to fetch data you do want to execute as often as possible but never twice at the same time).

Daan added 5 commits November 6, 2024 13:55
* main:
  chore(main): release 8.3.1 (nodeshift#907)
  fix: Incorrect default value of maxEntries for MemoryCache nodeshift#904 (nodeshift#906)

# Conflicts:
#	lib/cache.js
Merge branch 'main' into coalesce-reset-options

* main:
  chore(main): release 8.3.1 (nodeshift#907)
  fix: Incorrect default value of maxEntries for MemoryCache nodeshift#904 (nodeshift#906)

# Conflicts:
#	lib/cache.js
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11931665972

Details

  • 10 of 11 (90.91%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 98.085%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/circuit.js 9 10 90.0%
Totals Coverage Status
Change from base Build 11779273678: -0.2%
Covered Lines: 411
Relevant Lines: 413

💛 - Coveralls

@lholmquist
Copy link
Member

could you also update the readme with this new functionally

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.

3 participants