@sap-cloud-sdk/core
Version:
SAP Cloud SDK for JavaScript core
34 lines • 2.31 kB
TypeScript
import { Cache, IsolationStrategy } from '../cache';
import { Destination } from './destination-service-types';
import { DestinationsByType } from './destination-accessor-types';
/**
* Calculates a cache key based on the jwt and destination name for the given isolation strategy.
* Cache keys for strategies are non-overlapping, i.e. using a cache key for strategy [[IsolationStrategy.Tenant]]
* will not result in a cache hit for a destination that has been cached with strategy [[IsolationStrategy.Tenant_User]].
* @param decodedJwt - The decoded JWT of the current request.
* @param destinationName - The name of the destination.
* @param isolationStrategy - The strategy used to isolate cache entries.
* @returns The cache key.
* @hidden
*/
export declare function getDestinationCacheKeyStrict(decodedJwt: Record<string, any>, destinationName: string, isolationStrategy?: IsolationStrategy): string | undefined;
/**
* @deprecated Since v1.52.0. Use [[getDestinationCacheKeyStrict]] instead.
* Calculates a cache key based on the jwt and destination name for the given isolation strategy.
* Cache keys for strategies are non-overlapping, i.e. using a cache key for strategy [[IsolationStrategy.Tenant]]
* will not result in a cache hit for a destination that has been cached with strategy [[IsolationStrategy.Tenant_User]].
* @param decodedJwt - The decoded JWT of the current request.
* @param destinationName - The name of the destination.
* @param isolationStrategy - The strategy used to isolate cache entries.
* @returns The cache key.
* @hidden
*/
export declare function getDestinationCacheKey(decodedJwt: Record<string, any>, destinationName: string, isolationStrategy: IsolationStrategy): string;
export declare const destinationCache: {
retrieveDestinationFromCache: (decodedJwt: Record<string, any>, name: string, isolation: IsolationStrategy) => Destination | undefined;
cacheRetrievedDestination: (decodedJwt: Record<string, any>, destination: Destination, isolation: IsolationStrategy) => void;
cacheRetrievedDestinations: (decodedJwt: Record<string, any>, retrievedDestinations: DestinationsByType, isolation: IsolationStrategy) => void;
clear: () => void;
getCacheInstance: () => Cache<Destination>;
};
//# sourceMappingURL=destination-cache.d.ts.map