-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
durableObjectsPersist
option
Uses cloudflare/workerd#302 to enable Durable Object persistence. - `durableObjectsPersist: undefined | false | "memory:"` stores "in-memory" - `durableObjectsPersist: true` stores under `.mf` on the file-system - `durableObjectsPersist: "(file://)?<path>"` stores under `<path>` on the file-system Note Miniflare 2 persisted in-memory data between options reloads. In Miniflare 3, `workerd` restarts on every reload, so if we used `workerd`'s in-memory storage, we'd lose data every time options changed. To maintain Miniflare 2's behaviour, "in-memory" storage isn't actually in-memory. Instead, we write to a temporary directory and clean this up on `dispose()`/exit. 🙈 Also fixes a bug if multiple services bound to the same Durable Object class. This would result in duplicate entries in `durableObjectClassNames`. This has been changed from a `Map` of `string[]`s to a `Map` of `Set<string>`s to enforce the uniqueness constraint. Closes cloudflare/workers-sdk#2403 Closes cloudflare/workers-sdk#2458 Internal ticket: DEVX-219
- Loading branch information
Showing
12 changed files
with
410 additions
and
54 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.