UNPKG

n8n-bookstack-agent-tool

Version:

Comprehensive BookStack API integration tool for n8n AI Agent with MCP framework compatibility

37 lines 1.24 kB
export interface CacheEntry<T> { data: T; timestamp: number; ttl: number; } export interface CacheConfig { defaultTtl: number; maxSize: number; enabled: boolean; } export declare class CacheManager { protected cache: Map<string, CacheEntry<any>>; private config; constructor(config?: Partial<CacheConfig>); get<T>(key: string): T | null; set<T>(key: string, data: T, ttl?: number): void; delete(key: string): boolean; clear(): void; has(key: string): boolean; size(): number; getStats(): { size: number; maxSize: number; enabled: boolean; }; private evictOldest; static generateCacheKey(resource: string, operation: string, params?: any): string; } export declare class BookStackCache extends CacheManager { constructor(config?: Partial<CacheConfig>); cacheResource(resource: string, id: number, data: any, ttl?: number): void; getResource<T>(resource: string, id: number): T | null; cacheList(resource: string, params: any, data: any, ttl?: number): void; getList<T>(resource: string, params: any): T | null; invalidateResource(resource: string, id?: number): void; } //# sourceMappingURL=cache-manager.d.ts.map