@atlaskit/profilecard
Version:
A React component to display a card with user information.
19 lines (18 loc) • 502 B
TypeScript
import { LRUMap } from 'lru_map';
interface CachedData<T> {
expire: number;
profile: T;
}
export interface CacheConfig {
cacheSize?: number;
cacheMaxAge?: number;
}
export default class CachingClient<T> {
config: Required<CacheConfig>;
cache: LRUMap<string, CachedData<T>> | null;
constructor(config: CacheConfig);
setCachedProfile(cacheIdentifier: string, profile: T): void;
getCachedProfile(cacheIdentifier: string): T | null;
flushCache(): void;
}
export {};