Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/content/docs/durable-objects/api/storage-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import { Render, Type, MetaInfo, GlossaryTooltip } from "~/components";

The Durable Object Storage API allows <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip> to access transactional and strongly consistent storage. A Durable Object's attached storage is private to its unique instance and cannot be accessed by other objects.

:::note[Scope of Durable Object storage]
Note that Durable Object storage is scoped by individual <GlossaryTooltip term="Durable Object">Durable Objects</GlossaryTooltip>.

- An account can have many Durable Object <GlossaryTooltip term="namespace">namespaces</GlossaryTooltip>.
- A namespace can have many Durable Objects.

However, storage is scoped per individual Durable Object.
:::

Durable Objects gain access to a persistent Durable Object Storage API via `ctx.storage`, on the `ctx` parameter passed to the Durable Object constructor.

While access to a Durable Object is single-threaded, request executions can still interleave with each other when they wait on I/O, such as when waiting on the promises returned by persistent storage methods or `fetch()` requests.
Expand Down
Loading