import type { SmartLinkResponse } from '@atlaskit/linking-types/smart-link'; type CacheEntry = { data: SmartLinkResponse; timestamp: number; }; /** * Singleton cache client for smart link responses. Uses sessionStorage for per-tab isolation (no cross-tab conflicts). * If switching to localStorage for cross-tab sharing, add a 'storage' event listener in the constructor to sync * memoryCache when other tabs modify the cache, preventing race conditions from concurrent writes. */ export declare class SmartCardLocalCacheClient { private static instance; private readonly storageClient; private maxItems; private memoryCache; private pendingWrite; private constructor(); /** * Gets the singleton instance of SmartCardLocalCacheClient. * This ensures all callers share the same in-memory cache and prevents * race conditions when multiple instances write to the same storage key. * @param maxItems Maximum number of items to store in the cache (only used on first instantiation) * @returns The singleton instance */ static getInstance(maxItems?: number): SmartCardLocalCacheClient; /** * Resets the singleton instance. Only intended for testing purposes. * @internal */ static resetInstance(): void; /** * Retrieves the entire cache object from memory * @returns The entire cache object */ getCache: () => Record; /** * Caches the SmartLinkResponse against the provided url in storage * @param url The url (key) to store the response against * @param response The SmartLinkResponse to be cached in storage */ setItem: (url: string, response: SmartLinkResponse) => void; /** * Retrieves the cached SmartLinkResponse for the provided url from storage (if it exists) * @param url The url (key) to retrieve the cached response for * @returns The cached SmartLinkResponse if it exists, else undefined */ getItem: (url: string | undefined) => SmartLinkResponse | undefined; /** * Checks if a cached entry exists for the provided url in storage * @param url The url (key) to check for existence in the cache * @returns True if a cached entry exists, else false */ isUrlInCache: (url: string) => boolean; } export {};