toggl_clear_cache
Clear cached Toggl Track data to ensure reports and timers reflect the most current information, resolving synchronization issues.
Instructions
Clear all cached data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:811-824 (handler)Handler logic for the 'toggl_clear_cache' tool. Calls cache.clearCache() to clear all cached data, resets the cacheWarmed flag, and returns a JSON success message.case 'toggl_clear_cache': { cache.clearCache(); cacheWarmed = false; return { content: [{ type: 'text', text: JSON.stringify({ success: true, message: 'Cache cleared successfully' }) }] }; }
- src/index.ts:375-382 (registration)Registration of the 'toggl_clear_cache' tool in the tools array, including name, description, and input schema. Used by ListToolsRequestSchema handler.name: 'toggl_clear_cache', description: 'Clear all cached data', inputSchema: { type: 'object', properties: {}, required: [] }, }
- src/index.ts:377-380 (schema)Input schema for toggl_clear_cache: empty object (no parameters required).inputSchema: { type: 'object', properties: {}, required: []
- src/cache-manager.ts:382-394 (helper)Supporting CacheManager.clearCache() method that clears all internal Map caches for workspaces, projects, clients, tasks, users, tags, and resets performance stats.clearCache(): void { this.workspaces.clear(); this.projects.clear(); this.clients.clear(); this.tasks.clear(); this.users.clear(); this.tags.clear(); this.stats = { hits: 0, misses: 0, lastReset: new Date() }; }