/** * Copyright (c) Microsoft Corporation. All rights reserved. */ import type { ICacheData } from './ICacheData'; import type { IRequestCacheOptions } from './IRequestCacheOptions'; import type { IDisposable } from '@microsoft/sp-core-library'; /** * CacheKeyType describes the type of CacheKey that needs to be generated for the scenario. * @internal */ export declare enum CacheKeyType { HttpGenerated = 0, CustomGenerated = 1 } /** * ICacheDataProvider is the contract to be met by caching data providers * * @internal */ export interface ICacheDataProvider extends IDisposable { /** * Gets the cache key based on the provided arguments * @param keyType - Type of cache key * @param args - The arguments required to generate the Cache Key */ getCacheKey(keyType: CacheKeyType, ...args: any[]): TKey; /** * Gets data from the cache provider for the given cache Key * * @param cacheKey - The key to retrieve the cache entry * @param options - The cache data options */ getData(cacheKey: TKey, options: IRequestCacheOptions | undefined): Promise>; /** * Sets cache data for the given cache key * * @param cacheKey - The key to set the cached Data * @param cacheData - The cached data * @param options - The cache data options */ setData(cacheKey: TKey, cacheData: TData, options: IRequestCacheOptions | undefined): Promise; } //# sourceMappingURL=ICacheDataProvider.d.ts.map