-
Notifications
You must be signed in to change notification settings - Fork 774
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using temporary directory if possible (#720)
Miniflare 2 persisted data in-memory between `setOptions()` calls when `*Persist` options were disabled. Whilst `workerd` has in-memory storage for Durable Objects, this is reset when `workerd` is restarted (i.e. when `setOptions()` 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` is `false`, and `unsafeEphemeralDurableObjects` is `true`. This change ensures we don't write to the temporary directory in these cases.
- Loading branch information
Showing
4 changed files
with
63 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters