DurableObjects DOs lifecycle

For Workes & Pages, what is the name of the domain?

na

What is the issue or error you’re encountering

I do not see a desctructor anywhere

What are the steps to reproduce the issue?

Trying to “save” the number of reads/writes.
I can hold my state in memory, while DO is alive, but I would like to persist to storage right before DO is destroyed.

I understand that I can get/put on each call, but this seems wasteful and just ramps up the usage for the storage.

For example, the “counter” example that is part of the documentation, Build a counter | Cloudflare Durable Objects docs,
you don’t really need to put/save during the increment and decrement, as DO guarantees the single-threaded execution

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.