UNPKG

shora-ai-payment-sdk

Version:

The first open-source payment SDK designed specifically for AI agents and chatbots - ACP Compatible

30 lines 926 B
/** * Caching utilities */ interface CacheOptions { ttl?: number; maxSize?: number; } declare class MemoryCache<T = any> { private cache; private readonly ttl; private readonly maxSize; constructor(options?: CacheOptions); get(key: string): T | undefined; set(key: string, value: T, ttl?: number): void; delete(key: string): boolean; clear(): void; size(): number; cleanup(): void; } declare class CacheManager { private caches; getCache<T>(name: string, options?: CacheOptions): MemoryCache<T>; clearCache(name: string): void; clearAllCaches(): void; cleanupAllCaches(): void; } export declare const cacheManager: CacheManager; export declare function cached<T = any>(ttl?: number, cacheName?: string): (target: any, propertyName: string, descriptor: PropertyDescriptor) => void; export { MemoryCache, CacheManager }; //# sourceMappingURL=caching.d.ts.map