Skip to main content
Glama

cache-stats

Monitor and retrieve cache statistics for cryptocurrency exchange data, enabling efficient tracking and analysis of cache performance in the CCXT integration environment.

Instructions

Get CCXT cache statistics

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • Inline handler function for the 'cache-stats' tool. It calls getCacheStats() and returns the statistics as formatted JSON text in the MCP response format.
    server.tool("cache-stats", "Get CCXT cache statistics", {}, async () => { return { content: [{ type: "text", text: JSON.stringify(getCacheStats(), null, 2) }] }; });
  • Core implementation of cache statistics retrieval. Returns detailed metrics including hit/miss counts and ratio, current cache size, maximum size, and last clear timestamp.
    export function getCacheStats() { return { hits: cacheStats.hits, misses: cacheStats.misses, hitRatio: cacheStats.hits + cacheStats.misses > 0 ? (cacheStats.hits / (cacheStats.hits + cacheStats.misses)).toFixed(2) : '0.00', size: dataCache.size, maxSize: dataCache.max, lastCleared: cacheStats.lastCleared }; }

Latest Blog Posts

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/doggybee/mcp-server-ccxt'

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