OpenAICloudflare Developer PlatformFeb 24, 2026, 12:00 AM

Durable Objects, Workers - deleteAll() now deletes Durable Object alarm

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Durable Objects, Workers - deleteAll() now deletes Durable Object alarm

Key Points

  • deleteAll() removes Durable Object alarms
  • Applies to KV and SQLite-backed Durable Objects
  • Requires compatibility date 2026-02-24+

Summary

As of Workers compatibility date 2026-02-24, storage.deleteAll() on Durable Objects also removes the object's alarm metadata in addition to stored data. Previously you needed to call deleteAlarm() separately to fully clear an object's storage. This change applies to both KV-backed and SQLite-backed Durable Objects.

Key Points

  • deleteAll() now deletes Durable Object alarm metadata as well as user-stored data.
  • Applies to Durable Objects with compatibility date 2026-02-24 or later.
  • Works for both KV-backed and SQLite-backed Durable Objects.
  • Previously required two calls (deleteAlarm() + deleteAll()); now a single call suffices.
  • No change for objects running older compatibility dates.

Example

JavaScript

// Before: two API calls required to clear all storage
await this.ctx.storage.deleteAlarm();
await this.ctx.storage.deleteAll();

// Now: a single call clears both data and the alarm
await this.ctx.storage.deleteAll();

Action for engineers

  • Remove explicit deleteAlarm() calls if you target compatibility date 2026-02-24 or later.
  • Test cleanup and migration paths to avoid unintended deletions when upgrading the compatibility date.
  • See the Storage API documentation for details and edge cases.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Durable Objects、Workers — deleteAll() が Durable Object の alarm を削除するようになりました

deleteAll() が Durable Object の alarm を削除するようになりました

公開日: 2026-02-24

タグ: Durable Objects, Workers

概要

  • 互換性日が 2026-02-24 以降の Workers において、deleteAll() がストレージ内のデータに加えて Durable Object の alarm も削除するようになりました。
  • これにより、Durable Object のストレージを単一の API 呼び出しでクリアできるようになります。
  • この変更は KV-backed と SQLite-backed の両方の Durable Objects に適用されます。

詳細

以前は deleteAll() はオブジェクトに格納されたユーザーデータのみを削除しており、alarm の使用によってストレージに保存されたメタデータは deleteAlarm() を別途呼び出す必要がありました。今回の変更により、alarm に関連するストレージも deleteAll() でまとめて削除されるようになり、完全なクリーンアップが簡素化されます。

以下は変更前後の例です。

  • 変更前(ストレージを完全にクリアするには2回の API 呼び出しが必要):

    // Before: two API calls required to clear all storage await this.ctx.storage.deleteAlarm(); await this.ctx.storage.deleteAll();

  • 変更後(単一の呼び出しでデータと alarm の両方をクリア):

    // Now: a single call clears both data and the alarm await this.ctx.storage.deleteAll();

参照

詳細は Storage API documentation を参照してください。