Skip to main content

FluidCache Class

A cache that can be used by the Fluid ODSP driver to cache data for faster performance.

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

To use, import via @fluidframework/driver-web-cache/legacy.

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

Signature

export declare class FluidCache implements IPersistedCache

Implements: IPersistedCache

Constructors

ConstructorAlertsDescription
(constructor)(config)BetaConstructs a new instance of the FluidCache class

Methods

MethodAlertsReturn TypeDescription
get(cacheEntry)BetaPromise<any>
put(entry, value)BetaPromise<void>
removeEntries(file)BetaPromise<void>

Constructor Details

(constructor)

Constructs a new instance of the FluidCache class

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

constructor(config: FluidCacheConfig);

Parameters

ParameterTypeDescription
configFluidCacheConfig

Method Details

get

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

get(cacheEntry: ICacheEntry): Promise<any>;

Parameters

ParameterTypeDescription
cacheEntryICacheEntry

Returns

Return type: Promise<any>

put

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

put(entry: ICacheEntry, value: any): Promise<void>;

Parameters

ParameterTypeDescription
entryICacheEntry
valueany

Returns

Return type: Promise<void>

removeEntries

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

removeEntries(file: IFileEntry): Promise<void>;

Parameters

ParameterTypeDescription
fileIFileEntry

Returns

Return type: Promise<void>