Skip to content

Conversation

@Bnaya
Copy link
Contributor

@Bnaya Bnaya commented Dec 26, 2025

No description provided.

When timeout: 0 is set (SWR mode), subsequent requests should return
stale data immediately, even when lockTimeout is configured. Previously,
lockTimeout would override this behavior causing requests to wait for
the lock instead of returning stale data immediately.

This change ensures that when timeout: 0 with a fallback value and grace
period enabled, the lock timeout is always 0, allowing immediate return
of stale data regardless of the lockTimeout setting.

Fixes Julien-R44#103
@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2025

🦋 Changeset detected

Latest commit: d39e74b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bentocache Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Julien-R44 Julien-R44 merged commit c4d7a93 into Julien-R44:main Dec 26, 2025
4 checks passed
@Bnaya Bnaya deleted the fix/lockTimeout-overrides-timeout-0 branch December 27, 2025 17:04
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