bc-symbols-mcp
Version:
MCP server for analyzing Business Central .app files and BC object structures
85 lines • 2.12 kB
TypeScript
import { BCApp } from '../types/bc-types.js';
export declare class MemoryCache {
private cache;
private maxAge;
constructor(maxAgeMinutes?: number);
/**
* Store an app in the cache
*/
set(filePath: string, app: BCApp): void;
/**
* Retrieve an app from the cache
* Returns null if not found, expired, or file hash doesn't match
*/
get(filePath: string, currentFileHash: string): BCApp | null;
/**
* Check if an app is cached and valid
*/
has(filePath: string, currentFileHash: string): boolean;
/**
* Remove an app from the cache
*/
delete(filePath: string): boolean;
/**
* Clear all cached apps
*/
clear(): void;
/**
* Get all cached file paths
*/
getCachedPaths(): string[];
/**
* Get all cached apps that are still valid
*/
getValidCachedApps(): BCApp[];
/**
* Clean up expired entries
*/
cleanup(): number;
/**
* Get cache statistics
*/
getStats(): {
totalEntries: number;
validEntries: number;
expiredEntries: number;
totalMemoryUsage: number;
};
/**
* Find cached apps by criteria
*/
findApps(predicate: (app: BCApp) => boolean): BCApp[];
/**
* Find a cached app by app ID
*/
findAppById(appId: string): BCApp | null;
/**
* Find cached apps by publisher
*/
findAppsByPublisher(publisher: string): BCApp[];
/**
* Find cached apps that depend on a specific app
*/
findAppsDependingOn(targetAppId: string): BCApp[];
/**
* Get dependency tree for an app
*/
getDependencyTree(appId: string): string[];
/**
* Get reverse dependency tree (apps that depend on this app)
*/
getReverseDependencyTree(appId: string): string[];
/**
* Set cache expiration time
*/
setMaxAge(maxAgeMinutes: number): void;
/**
* Check if cache is empty
*/
isEmpty(): boolean;
/**
* Get cache size in entries
*/
size(): number;
}
//# sourceMappingURL=memory-cache.d.ts.map