UNPKG

xc-mcp

Version:

MCP server that wraps Xcode command-line tools for iOS/macOS development workflows

53 lines 4.05 kB
import type { ToolResult } from '../../types/xcode.js'; /** * Configure cache retention times to optimize for your workflow * * **What it does:** * Fine-tune cache retention policies for simulator, project, and response caches. Allows you to * balance performance (longer cache retention) against freshness (shorter retention). Default is * 1 hour for most caches. Supports specifying duration in milliseconds, minutes, or hours for * convenience. * * **Why you'd use it:** * - Optimize for development workflows (longer cache = faster repeated operations) * - Optimize for CI/CD environments (shorter cache = fresher data, less stale state) * - Reduce memory usage by lowering retention times for infrequently-accessed caches * - Extend retention for slow-changing projects to maximize performance gains * * **Parameters:** * - cacheType (string): Which cache to configure - "simulator", "project", "response", or "all" * - maxAgeMs (number, optional): Cache retention in milliseconds * - maxAgeMinutes (number, optional): Cache retention in minutes (alternative to maxAgeMs) * - maxAgeHours (number, optional): Cache retention in hours (alternative to maxAgeMs) * * Note: Specify exactly one of maxAgeMs, maxAgeMinutes, or maxAgeHours. Minimum 1000ms (1 second). * * **Returns:** * JSON object containing configuration update results per cache type and human-readable durations * * **Example:** * ```typescript * // Set all caches to 2 hours for long development session * await setCacheConfigTool({cacheType: "all", maxAgeHours: 2}); * * // Set simulator cache to 30 minutes for CI/CD * await setCacheConfigTool({cacheType: "simulator", maxAgeMinutes: 30}); * * // Returns: * // { * // "message": "Cache configuration updated", * // "results": { * // "simulator": "Set to 30m 0s", * // "project": "Set to 30m 0s" * // } * // } * ``` * * **Full documentation:** See cache/set-config.md for detailed parameters and examples * * @param args Tool arguments with cacheType and duration * @returns Tool result with configuration update confirmation */ export declare function setCacheConfigTool(args: any): Promise<ToolResult>; export declare const CACHE_SET_CONFIG_DOCS = "\n# cache-set-config\n\n\u2699\uFE0F **Configure cache retention times to optimize for your workflow** - Fine-tune cache policies.\n\nFine-tune cache retention policies for simulator, project, and response caches. Allows you to balance performance (longer cache retention) against freshness (shorter retention). Default is 1 hour for most caches. Supports specifying duration in milliseconds, minutes, or hours for convenience.\n\n## Advantages\n\n\u2022 Optimize for development workflows (longer cache = faster repeated operations)\n\u2022 Optimize for CI/CD environments (shorter cache = fresher data, less stale state)\n\u2022 Reduce memory usage by lowering retention times for infrequently-accessed caches\n\u2022 Extend retention for slow-changing projects to maximize performance gains\n\n## Parameters\n\n### Required\n- cacheType (string): Which cache to configure - \"simulator\", \"project\", \"response\", or \"all\"\n\n### Optional\n- maxAgeMs (number): Cache retention in milliseconds\n- maxAgeMinutes (number): Cache retention in minutes (alternative to maxAgeMs)\n- maxAgeHours (number): Cache retention in hours (alternative to maxAgeMs)\n\nNote: Specify exactly one of maxAgeMs, maxAgeMinutes, or maxAgeHours. Minimum 1000ms (1 second).\n\n## Returns\n\n- Tool execution results with configuration update confirmation\n- Results per cache type with human-readable durations\n- Timestamp of configuration change\n\n## Related Tools\n\n- cache-get-config: Get current cache configuration\n- cache-get-stats: Monitor cache performance\n- cache-clear: Clear cached data\n\n## Notes\n\n- Tool is auto-registered with MCP server\n- Changes apply immediately\n- Response cache is currently fixed at 30 minutes\n- Use with cache-get-stats to verify effectiveness\n"; //# sourceMappingURL=set-config.d.ts.map