Skip to main content
Glama

MCP Design System Extractor

cache.ts780 B
export class Cache { private cache: Map<string, { data: any; timestamp: number }>; private cacheDuration: number; constructor(cacheDurationMs: number = 300000) { // 5 minutes default this.cache = new Map(); this.cacheDuration = cacheDurationMs; } get<T>(key: string): T | null { const cached = this.cache.get(key); if (!cached) { return null; } const now = Date.now(); if (now - cached.timestamp > this.cacheDuration) { this.cache.delete(key); return null; } return cached.data as T; } set<T>(key: string, data: T): void { this.cache.set(key, { data, timestamp: Date.now(), }); } clear(): void { this.cache.clear(); } size(): number { return this.cache.size; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/freema/mcp-design-system-extractor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server