turbodombuilder - v0.9.5
    Preparing search index...

    Type Alias CacheOptions

    Options for configuring the @cache decorator.

    type CacheOptions = {
        timeout?: number;
        onEvent?: string | string[];
        onCallback?: () => boolean | Promise<boolean>;
        onCallbackFrequency?: number;
        onFieldChange?: string | Function | (string | Function)[];
        clearOnNextFrame?: boolean;
    }
    Index

    Properties

    timeout?: number

    The duration (in milliseconds) after which the cache should expire.

    onEvent?: string | string[]

    A string of one or more space-separated event names or an array of event names. The cache will be cleared when one of these events occur on the instance.

    onCallback?: () => boolean | Promise<boolean>

    A callback function that returns a boolean or a promise resolving to a boolean. The cache will be cleared if the function returns true.

    onCallbackFrequency?: number

    The frequency (in milliseconds) at which the onCallback function is called.

    onFieldChange?: string | Function | (string | Function)[]

    The field or function names to watch for changes. The cache will be cleared when any of these change. Multiple field names can be provided in the same.

    clearOnNextFrame?: boolean

    If set to true, the cache will be cleared on the next animation frame.