@tgomareli/macos-tools-mcp
Version:
MCP server for advanced macOS system monitoring and file search capabilities
31 lines • 1.18 kB
TypeScript
import NodeCache from "node-cache";
interface CacheConfig {
stdTTL: number;
checkperiod: number;
maxKeys?: number;
}
declare class PerformanceCache {
private cache;
constructor(config: CacheConfig);
get<T>(key: string, fetcher: () => Promise<T>, ttl?: number): Promise<T>;
set(key: string, value: any, ttl?: number): boolean;
del(key: string): number;
flush(): void;
getStats(): NodeCache.Stats;
}
export declare const systemMetricsCache: PerformanceCache;
export declare const processListCache: PerformanceCache;
export declare const searchIndexCache: PerformanceCache;
export declare const fileTagsCache: PerformanceCache;
export declare function createCacheKey(prefix: string, params: Record<string, any>): string;
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
export declare class RateLimiter {
private requests;
private readonly maxRequests;
private readonly windowMs;
constructor(maxRequests: number, windowMs: number);
checkLimit(): Promise<boolean>;
waitForSlot(): Promise<void>;
}
export {};
//# sourceMappingURL=cache.d.ts.map