toggl_clear_cache
Clear cached Toggl Track data to ensure reports and timers reflect current information. Use this tool to refresh time tracking data when encountering outdated or inconsistent results.
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 'toggl_clear_cache' tool. Clears the cache via CacheManager.clearCache(), 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:374-382 (registration)Registers the 'toggl_clear_cache' tool in the tools array used for tool listing (ListToolsRequestSchema). Includes name, description, and empty input schema.{ name: 'toggl_clear_cache', description: 'Clear all cached data', inputSchema: { type: 'object', properties: {}, required: [] }, }
- src/cache-manager.ts:382-394 (helper)CacheManager.clearCache() method implementation that clears all internal cache Maps (workspaces, projects, etc.) and resets performance statistics.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() }; }