Skip to content

fix: do not mutate dump entries in load() - #426

Open
junaidkhan80121 wants to merge 1 commit into
isaacs:mainfrom
junaidkhan80121:fix/load-mutate-dump-421
Open

junaidkhan80121 wants to merge 1 commit into
isaacs:mainfrom
junaidkhan80121:fix/load-mutate-dump-421

Conversation

@junaidkhan80121

Copy link
Copy Markdown

Summary

Test plan

  • Standalone repro: two load(dump) calls both return the value; dump[0][1].start unchanged
  • Added coverage in test/load.ts

This branch has not been deployed

No deployments
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.

load() mutates the caller's dump entries, so loading the same dump into a second cache makes every TTL entry stale

1 participant