sfcc-dev-mcp
Version:
MCP server for Salesforce B2C Commerce Cloud development assistance including logs, debugging, and development tools
53 lines • 1.54 kB
TypeScript
import { SFCCLogClient } from '../clients/log-client.js';
/**
* Simple in-memory cache for log operations
* Provides short-term caching to avoid repeated API calls for common operations
*/
export declare class LogCache {
private cache;
private readonly DEFAULT_TTL;
private readonly MAX_CACHE_SIZE;
/**
* Get cached data if available and not expired
*/
get<T>(key: string): T | null;
/**
* Set cached data with TTL
*/
set(key: string, data: any, ttl?: number): void;
/**
* Generate cache key for log operations
*/
static generateKey(operation: string, args: Record<string, any>): string;
/**
* Clear all cached entries
*/
clear(): void;
/**
* Remove expired entries (can be called periodically)
*/
cleanup(): void;
}
/**
* Enhanced log client wrapper with caching capabilities
* Provides transparent caching for frequently accessed log operations
*/
export declare class CachedLogClient {
private logClient;
private cache;
private readonly CACHEABLE_OPERATIONS;
constructor(logClient: SFCCLogClient);
/**
* Execute operation with caching if applicable
*/
executeWithCache<T>(operation: string, args: Record<string, any>, executor: () => Promise<T>, ttl?: number): Promise<T>;
/**
* Clear cache - useful when log state might have changed
*/
clearCache(): void;
/**
* Cleanup expired cache entries
*/
cleanupCache(): void;
}
//# sourceMappingURL=log-cache.d.ts.map