HardAtWork
03/12/2023, 9:03 AMwrangler
is the CLI, miniflare
is the system that actually mocks a Workers environment, and workerd
, if you choose to use it, is the actual Workers runtime.Advany
03/12/2023, 9:58 AMfrankichiro
03/12/2023, 10:11 AMHardAtWork
03/12/2023, 10:14 AMwrangler.toml
johtso
03/12/2023, 12:38 PMHardAtWork
03/12/2023, 12:39 PMjohtso
03/12/2023, 12:40 PMjohtso
03/12/2023, 12:40 PMHardAtWork
03/12/2023, 12:41 PMsetAlarm()
to set the alarm time to Date.now() + timeout
. There is only one alarm per object, so each call to setAlarm()
replaces the previous alarm with the new alarm time. When that time is reached, the alarm handler will be invoked. In your alarm
handler, you would use storage.deleteAll()
to delete your object.
>
> Since it’s possible to build TTL using alarms, we probably won’t be adding a separate TTL feature.
- Kentonjohtso
03/12/2023, 12:45 PMjohtso
03/12/2023, 12:46 PMSubh
03/12/2023, 6:15 PMLarry
03/12/2023, 6:28 PMenv.MY_DO_NAMESPACE.idFromName(name)
? Those require a global lookup on object creation and should be avoided.Subh
03/12/2023, 6:31 PMidFromName
. Changing that to id, that would show significant change I guess?crabmusket
03/13/2023, 1:08 AMjohtso
03/13/2023, 1:12 AMjohtso
03/13/2023, 1:14 AMfrankichiro
03/13/2023, 11:29 AMDeleted User
03/13/2023, 11:38 AMfrankichiro
03/13/2023, 12:03 PMDeleted User
03/13/2023, 12:26 PMDeleted User
03/13/2023, 12:31 PMDeleted User
03/13/2023, 12:32 PMfrankichiro
03/13/2023, 1:01 PMfrankichiro
03/13/2023, 1:02 PMfrankichiro
03/13/2023, 1:03 PMfrankichiro
03/13/2023, 1:08 PMfrankichiro
03/13/2023, 1:09 PMthemetanull
03/13/2023, 4:00 PM