Skip to content

Commit 36fb1fc

Browse files
authored
Update src/content/docs/durable-objects/examples/durable-object-ttl.mdx
1 parent 6a48149 commit 36fb1fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/durable-objects/examples/durable-object-ttl.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A common feature request for Durable Objects is a Time To Live (TTL) for Durable
1414

1515
:::caution[Not available in local development]
1616

17-
The TTL is extended upon every new fetch request to the Durable Object. It might be tempting to instead extend the TTL in the constructor of the Durable Object. This is not advised because the Durable Object's constructor will be called before invoking the alarm handler if the alarm wakes the Durable Object up from hibernation. This approach will naively result in the constructor continually extending the TTL without running the alarm handler.
17+
The TTL is extended upon every new fetch request to the Durable Object. Cloudflare does not advise extending the TTL in the constructor of the Durable Object. This is because the Durable Object's constructor will be called before invoking the [alarm handler](/durable-objects/api/alarms/#handler-methods) if the alarm wakes the Durable Object from hibernation. This approach will naively result in the constructor continually extending the TTL without running the alarm handler.
1818

1919
:::
2020

0 commit comments

Comments
 (0)