sodax_refresh_cache
Clear cached API data to ensure fresh fetches on next requests, removing stale responses.
Instructions
Clear the cached API data to force fresh fetches on next requests
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/sodaxApi.ts:997-1012 (handler)The MCP tool registration for 'sodax_refresh_cache' with the handler function that calls getCacheStats() and clearCache() to clear the API cache and return the count of removed entries.
server.tool( "sodax_refresh_cache", "Clear the cached API data to force fresh fetches on next requests", {}, { readOnlyHint: false, destructiveHint: false, idempotentHint: true }, async () => { const statsBefore = getCacheStats(); clearCache(); return { content: [{ type: "text", text: `Cache cleared. ${statsBefore.size} cached entries removed.` }] }; } ); - src/index.ts:263-264 (registration)Registration of 'sodax_refresh_cache' in the 'partnersAndToken' group in the tool listing endpoint at /api.
"sodax_refresh_cache" ], - src/services/sodaxApi.ts:647-649 (helper)The clearCache() helper function that clears the in-memory cache Map.
export function clearCache(): void { cache.clear(); } - src/services/sodaxApi.ts:654-659 (helper)The getCacheStats() helper function that returns cache size and keys.
export function getCacheStats(): { size: number; keys: string[] } { return { size: cache.size, keys: Array.from(cache.keys()) }; } - src/services/analytics.ts:64-64 (registration)Analytics tracking entry mapping 'sodax_refresh_cache' to the 'api' group.
sodax_refresh_cache: "api",