Commit 834a021
committed
fix(webapp): correct entitlement cache stale TTL
The stale parameter on @unkey/cache Namespace is the TOTAL ttl,
not an additional window beyond fresh. Setting fresh: 60_000 and
stale: 60_000 gave a fresh-only entry that expired entirely at 60s
with no SWR window. Setting stale: 120_000 yields the intended
behavior: fresh 0-60s, stale-revalidate 60-120s.
Verified locally with agentcrumbs by running through cache miss,
fresh hit, stale revalidate, and stale-with-failed-bg-revalidate
scenarios against a live billing server.1 parent 312c91b commit 834a021
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments