/** * Copyright (c) Microsoft Corporation. All rights reserved. */ /** * Represents the Cache Strategy to be used by the cached request * * @internal */ export declare const CacheStrategy: { /** * Serves from the server */ readonly NetworkOnly: 0; /** * Serves from the cache if available or undefined */ readonly CacheOnly: 1; /** * Serves from the cache if available * Sends network request only if cache is stale or not available * Update the cache with network data if network call is made */ readonly CacheThenNetwork: 2; /** * Serves from the cache if available, and makes an async * network request to update the cache with fresh data. */ readonly CacheAndNetwork: 3; }; /** * Represents the Cache Strategy to be used by the cached request * * @internal */ export type CacheStrategy = (typeof CacheStrategy)[keyof typeof CacheStrategy]; /** * Represents the configurable options for cached SPHttpClient requests * * @internal */ export interface IHttpRequestCacheOptions { /** * Indicates the time in milliseconds that this cached response is valid for. * If undefined, cached data will never expire. */ expirationDuration: number | undefined; /** * Indicates the Id of the component instance that is requesting this HttpRequest to be cached. */ id: string; /** * Indicates the alias of the component instance that is requesting this HttpRequest to be cached. */ alias: string; } /** * Represents the configurable options and caching strategy for cached SPHttpClient requests * * @internal */ export interface IRequestCacheOptions extends IHttpRequestCacheOptions { /** * Indicates the cache strategy for this request * * @internal */ cacheStrategy?: CacheStrategy; /** * Extra properties to be used by cache data provider * * @internal */ extraProps?: Map; } //# sourceMappingURL=IRequestCacheOptions.d.ts.map