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

Fixed: Incorrect default value of maxEntries for MemoryCache #904 #906

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

daan944
Copy link
Contributor

@daan944 daan944 commented Nov 8, 2024

See #904

@coveralls
Copy link

coveralls commented Nov 8, 2024

Pull Request Test Coverage Report for Build 11744442717

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 98.333%

Totals Coverage Status
Change from base Build 11561061514: 0.005%
Covered Lines: 401
Relevant Lines: 402

💛 - Coveralls

@lholmquist
Copy link
Member

lholmquist commented Nov 8, 2024

could you add a test that checks that the value is what is expected?

Fixed: do not remove items from cache upon updating existing key.
@daan944
Copy link
Contributor Author

daan944 commented Nov 8, 2024

Sure, I've extended coverage for internal cache. And while doing so spotted that the oldest cache entry will be purged upon updates of existing keys too. Probably not a real issue, but it might lead to some head-scratching when someone is using the cache with a strict and fixed set of values. So fixed that.

@lholmquist lholmquist merged commit f7abe3f into nodeshift:main Nov 11, 2024
15 checks passed
@daan944 daan944 deleted the bugfix-cache-max-size branch November 11, 2024 14:53
daan944 pushed a commit to daan944/opossum that referenced this pull request Nov 20, 2024
* 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
daan944 pushed a commit to daan944/opossum that referenced this pull request Nov 20, 2024
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
lholmquist pushed a commit that referenced this pull request Nov 27, 2024
… success, timeout) (#908)

* Feature: option to reset coalesce depending on result of action.

* Fix: Don't crash when coalescing is disabled.

* Bugfix: Fix max size for cache entries.

* Fixed error whilst merging, accidentally removed cache delete function

Merge branch 'main' into coalesce-reset-options

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

# Conflicts:
#	lib/cache.js

* Docs: Update readme with coalesceResetOn and Fetch example.

---------

Co-authored-by: Daan <>
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