Skip to main content

PromiseCacheOptions Interface

Options for configuring the PromiseCache

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/core-utils/legacy.

For more information about our API support guarantees, see here.

Signature

export interface PromiseCacheOptions

Properties

PropertyAlertsModifiersTypeDescription
expiryBetaoptionalPromiseCacheExpiryCommon expiration policy for all items added to this cache
removeOnErrorBetaoptional(error: any) => booleanIf the stored Promise is rejected with a particular error, should the given key be removed?

Property Details

expiry

Common expiration policy for all items added to this cache

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

expiry?: PromiseCacheExpiry;

Type: PromiseCacheExpiry

removeOnError

If the stored Promise is rejected with a particular error, should the given key be removed?

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

removeOnError?: (error: any) => boolean;

Type: (error: any) => boolean