maplestorysea-mcp-server
Version:
NEXON MapleStory SEA API MCP Server for Claude Desktop - Complete character info, union details, guild data, rankings optimized for SEA servers
58 lines • 1.46 kB
TypeScript
/**
* Simple in-memory cache for API responses
*/
export declare class MemoryCache {
private cache;
private maxSize;
constructor(maxSize?: number);
/**
* Set a value in the cache with TTL (time to live) in milliseconds
*/
set<T>(key: string, value: T, ttl?: number): void;
/**
* Get a value from the cache
*/
get<T>(key: string): T | null;
/**
* Check if a key exists and is not expired
*/
has(key: string): boolean;
/**
* Delete a specific key
*/
delete(key: string): boolean;
/**
* Clear all cache entries
*/
clear(): void;
/**
* Remove expired entries
*/
cleanup(): void;
/**
* Get cache size
*/
size(): number;
/**
* Get cache statistics
*/
getStats(): {
size: number;
maxSize: number;
hitRate?: number;
};
/**
* Generate a cache key for character OCID lookup (SEA API optimized)
*/
static generateOcidCacheKey(characterName: string): string;
/**
* Generate a cache key for character basic info (SEA API optimized)
*/
static generateCharacterBasicCacheKey(ocid: string, date?: string): string;
/**
* Generate a cache key for any SEA API endpoint
*/
static generateApiCacheKey(endpoint: string, params: Record<string, any>): string;
}
export declare const defaultCache: MemoryCache;
//# sourceMappingURL=cache.d.ts.map