rag_cache_clear
Clear the LAZY-RAG cache to remove outdated or incorrect data and start fresh for accurate information retrieval.
Instructions
Clear the LAZY-RAG cache to start fresh
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/tools.ts:1307-1331 (handler)The implementation of the `handleRagCacheClear` handler function in `src/handlers/tools.ts`, which calls `getRAGIntegrator().clearCache()` and returns the operation result.
private async handleRagCacheClear(_args: any): Promise<CallToolResult> { try { const rag = getRAGIntegrator(); const result = rag.clearCache(); return { content: [{ type: 'text', text: `🧹 LAZY-RAG Cache Cleared ✅ Cleared ${result.previousSize} cached entries 💡 Next queries will call the API and repopulate the cache` }] }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return { content: [{ type: 'text', text: `❌ Failed to clear cache: ${errorMessage}` }], isError: true }; } }