Packages > @fluidframework/core-utils

@fluidframework/core-utils Package

Interfaces

Interface Alerts Description
PromiseCacheOptions ALPHA Options for configuring the PromiseCache

Classes

Class Alerts Description
Deferred ALPHA A deferred creates a promise and the ability to resolve or reject it
PromiseCache ALPHA A specialized cache for async work, allowing you to safely cache the promised result of some async work without fear of running it multiple times or losing track of errors.

Types

TypeAlias Alerts Description
PromiseCacheExpiry ALPHA Three supported expiry policies: - indefinite: entries don't expire and must be explicitly removed - absolute: entries expire after the given duration in MS, even if accessed multiple times in the mean time - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock)

Type Details

PromiseCacheExpiry (ALPHA)

Three supported expiry policies: - indefinite: entries don’t expire and must be explicitly removed - absolute: entries expire after the given duration in MS, even if accessed multiple times in the mean time - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock)

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

export type PromiseCacheExpiry = {
    policy: "indefinite";
} | {
    policy: "absolute" | "sliding";
    durationMs: number;
};