@ixily/activ
Version:
Alpha Capture Trade Idea Verification. Blockchain ownership proven trade ideas and strategies.
26 lines (25 loc) • 746 B
TypeScript
interface SlotsCache {
slots: number;
storage: Map<string, any>;
orderedIndex: string[];
}
interface ExpiringSlotsCache extends SlotsCache {
expiration: number;
createdAtStorage: Map<string, number>;
}
interface Slots {
cache: SlotsCache;
setSlots: (slots: number) => void;
add: <T>(key: string, data: T) => void;
get: <T>(key: string) => T | undefined;
flushCache: () => void;
}
interface ExpiringSlots extends Slots {
cache: ExpiringSlotsCache;
setExpiration: (expiration: number) => void;
}
export declare const PreCacheModule: {
getSlots: (name: string, howMany?: number) => Slots;
getExpiringSlots: (name: string, howMany?: number, expiration?: number) => ExpiringSlots;
};
export {};