perplexity_cache_clear
Force fresh API calls by clearing the response cache in the NasCoder Perplexity MCP Ultra-Pro server, ensuring up-to-date data and structured results.
Instructions
Clear the response cache to force fresh API calls
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:751-758 (handler)MCP tool call handler for 'perplexity_cache_clear' that invokes the clearCache method on the NascoderPerplexityMCP instance and formats the result as MCP content.case "perplexity_cache_clear": const clearResult = nascoderMCP.clearCache(); return { content: [{ type: "text", text: clearResult.message }] };
- index.js:683-691 (registration)Registration of the 'perplexity_cache_clear' tool in the TOOLS array, including description and empty input schema (no parameters required).{ name: "perplexity_cache_clear", description: "Clear the response cache to force fresh API calls", inputSchema: { type: "object", properties: {}, required: [] } },
- index.js:686-690 (schema)Input schema definition for the 'perplexity_cache_clear' tool, specifying an empty object (no input parameters required).inputSchema: { type: "object", properties: {}, required: [] }
- index.js:576-589 (helper)Helper method in NascoderPerplexityMCP class that clears the NodeCache by calling flushAll(), handles disabled cache cases, logs the action, and returns success/error status with message.clearCache() { try { if (this.cache) { this.cache.flushAll(); this.logger.info('Cache cleared successfully'); return { success: true, message: 'Cache cleared successfully' }; } else { return { success: true, message: 'No cache to clear (cache disabled)' }; } } catch (error) { this.logger.error('Failed to clear cache:', error.message); return { success: false, message: `Failed to clear cache: ${error.message}` }; } }