Closed mrbbot closed 1 year ago
Latest commit: 30ac489b4f286966e4756c240d108870b4b3abfa
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Miniflare 2 persisted data in-memory between
setOptions()
calls when*Persist
options were disabled. Whilstworkerd
has in-memory storage for Durable Objects, this is reset whenworkerd
is restarted (i.e. whensetOptions()
is called). To retain Miniflare 2 behaviour in Miniflare 3, we actually persist to a temporary directory when*Persist
options are disabled. There are cases where we don't need the temporary directory though: if we have no storage bindings configured,cache
isfalse
, andunsafeEphemeralDurableObjects
istrue
. This change ensures we don't write to the temporary directory in these cases.Ref: https://github.com/cloudflare/workers-sdk/issues/4167