curious if it's something that's planned
curious if it's something that's planned
do-transactional-outboxwrangler 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.wrangler.toml
You can build a TTL using alarms. Whenever your object is accessed, you would use- Kentonto set the alarm time tosetAlarm()Date.now() + timeout. There is only one alarm per object, so each call toreplaces the previous alarm with the new alarm time. When that time is reached, the alarm handler will be invoked. In yoursetAlarm()alarmhandler, you would usestorage.deleteAll()to delete your object.
Since it’s possible to build TTL using alarms, we probably won’t be adding a separate TTL feature.
env.MY_DO_NAMESPACE.idFromName(name)? Those require a global lookup on object creation and should be avoided.do-transactional-outboxDate.now() + timeoutalarmstorage.deleteAll()env.MY_DO_NAMESPACE.idFromName(name)