dify/api/controllers
Harry 70d0d46678 fix(api): remove tool provider list cache to fix cache inconsistency
This commit removes the Redis caching mechanism for tool provider list
API that was introduced in #29101.

## Problems with the current caching approach

1. **Cache inconsistency**: After CRUD operations on tool providers,
   cached data may not be properly invalidated, causing stale data.

2. **Race conditions**: Cache invalidation timing issues - invalidating
   inside Redis locks caused timeouts (#30150), moving outside causes
   race conditions.

3. **Hard to maintain**: Manual cache invalidation scattered across
   multiple service files is error-prone and difficult to maintain.

4. **User-facing symptoms**:
   - Newly created tools not appearing in the list
   - Deleted tools still showing up
   - Updated tool configurations not reflecting immediately
   - MCP provider auth state not updating correctly

## Changes

- Remove `ToolProviderListCache` class and its usage
- Remove cache invalidation calls from all service files
- Remove related test mocks
- Keep the code optimizations from #29101 (session management, batch processing)

Fixes #30322

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 16:32:42 +08:00
..
common fix(api): force download for HTML previews (#30090) 2025-12-25 11:43:07 +08:00
console fix(api): remove tool provider list cache to fix cache inconsistency 2025-12-29 16:32:42 +08:00
files fix(api): force download for HTML previews (#30090) 2025-12-25 11:43:07 +08:00
inner_api refactor: port reqparse to BaseModel (#28993) 2025-12-08 15:31:19 +09:00
mcp refactor: port reqparse to BaseModel (#28993) 2025-12-08 15:31:19 +09:00
service_api fix(dataset): dataset tags service_api error "Dataset not found" (#30028) 2025-12-26 10:55:42 +08:00
trigger fix: remove unnecessary error log when trigger endpoint returns 404 (#29587) 2025-12-12 17:53:40 +08:00
web refactor: split changes for api/controllers/web/forgot_password.py (#29858) 2025-12-24 09:41:51 +08:00
__init__.py chore(api/controllers): Apply Ruff Formatter. (#7645) 2024-08-26 15:29:10 +08:00