get_cache_status
Check cache performance metrics to monitor hit/miss rates by operation type and understand caching effectiveness in Optimizely DXP environments.
Instructions
💾 View cache performance metrics. REAL-TIME: <1s. NOTE: Cache is now operation-specific (no central management). Shows cache hit/miss rates for different operation types. Use to understand caching effectiveness. No parameters. Returns cache statistics by operation type.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_cache_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | No | ||
| projectId | No | ||
| action | No | status |
Implementation Reference
- lib/cache-manager.ts:558-570 (handler)Core handler logic for retrieving detailed cache statistics (hits, misses, size, hit rate, etc.), which implements the get_cache_status tool functionality.
getStats(): CacheStatsReport { const hitRate = this.cacheStats.hits + this.cacheStats.misses > 0 ? (this.cacheStats.hits / (this.cacheStats.hits + this.cacheStats.misses) * 100).toFixed(1) : '0.0'; return { ...this.cacheStats, entries: this.cache.size, hitRate: `${hitRate}%`, sizeMB: (this.cacheStats.size / (1024 * 1024)).toFixed(2), maxSizeMB: (this.options.maxCacheSize / (1024 * 1024)).toFixed(2) }; } - lib/utils/tool-availability-matrix.ts:339-343 (registration)Registration of the get_cache_status tool in the availability matrix, marking it as available across all hosting types under the Monitoring category.
'get_cache_status': { hostingTypes: ['dxp-paas', 'dxp-saas', 'self-hosted', 'unknown'], category: 'Monitoring', description: 'Get cache status' },