cache
Retrieve metrics, inspect and adjust age limits, and purge data for simulators, projects, or responses to optimize Xcode tool performance and handle large outputs.
Instructions
cache
Unified cache management - get statistics, get configuration, set configuration, clear cache.
Overview
Single tool for cache management. Routes to specialized handlers while maintaining clean operation semantics.
Operations
get-stats
Get cache statistics and metrics.
Example:
await cacheTool({ operation: 'get-stats' })Returns: Cache statistics including size, hit rates, and usage metrics.
get-config
Get cache configuration for specific cache type.
Parameters:
cacheType(string, optional): Cache type - 'simulator', 'project', 'response', or 'all'
Example:
await cacheTool({
operation: 'get-config',
cacheType: 'simulator'
})Returns: Current configuration including max age settings.
set-config
Set cache configuration.
Parameters:
cacheType(string): Cache type - 'simulator', 'project', 'response', or 'all'maxAgeMs(number, optional): Maximum age in millisecondsmaxAgeMinutes(number, optional): Maximum age in minutesmaxAgeHours(number, optional): Maximum age in hours
Example:
await cacheTool({
operation: 'set-config',
cacheType: 'simulator',
maxAgeHours: 2
})clear
Clear cache for specific type.
Parameters:
cacheType(string, optional): Cache type - 'simulator', 'project', 'response', or 'all'
Example:
await cacheTool({
operation: 'clear',
cacheType: 'simulator'
})Cache Types
simulator: Simulator list and state cache
project: Project configuration and build settings cache
response: Large response output cache for progressive disclosure
all: All caches (default when not specified)
Related Tools
list-cached-responses: View cached response IDsxcodebuild-get-details: Retrieve cached build outputsimctl-get-details: Retrieve cached simulator details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| cacheType | No | ||
| maxAgeMs | No | ||
| maxAgeMinutes | No | ||
| maxAgeHours | No |