Anchorage API reference
    Preparing search index...

    Interface PurgeExpiredThreadStateOptions

    interface PurgeExpiredThreadStateOptions {
        now?: () => number;
        tablePrefix?: string;
        ttlMs: number;
    }
    Index

    Properties

    now?: () => number

    Clock override for tests.

    tablePrefix?: string

    Must match createD1Storage's tablePrefix.

    ttlMs: number

    Thread-state rows (state-signal lanes + goals) whose updatedAt is older than this expire. An actively-updated goal or task lane bumps updatedAt on every write, so it never ages out; an abandoned thread's state does. No default (opt-in, like the notification and thread TTLs — durable state is kept until the host sets a window).