idb-ts
    Preparing search index...

    Interface RetentionPolicyOptions

    Options accepted by the RetentionPolicy class decorator.

    interface RetentionPolicyOptions {
        enabled?: boolean;
        field?: string;
        seconds: number;
    }
    Index

    Properties

    enabled?: boolean

    Whether the retention cleanup job is active for this entity.

    true
    
    field?: string

    The numeric timestamp field (milliseconds since Unix epoch) used to determine record age. Defaults to the internally managed __idb_createdAt field.

    '__idb_createdAt'
    
    seconds: number

    Duration in seconds after which records are considered expired and eligible for automatic deletion. Must be a positive integer.