dify/api/controllers/console
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
..
app fix: csv injection in annotations export (#29462) 2025-12-15 17:14:05 +08:00
auth chore: remove unused login call from activation flow (#30017) 2025-12-23 12:26:52 +08:00
billing refactor: part of remove all reqparser (#29847) 2025-12-25 19:57:07 +08:00
datasets fix: handle missing `credential_id` (#30051) 2025-12-24 11:21:51 +08:00
explore refactor: split changes for api/controllers/console/explore/message.py (#29890) 2025-12-26 11:02:12 +08:00
tag refactor: part of remove all reqparser (#29848) 2025-12-18 16:52:51 +08:00
workspace fix(api): remove tool provider list cache to fix cache inconsistency 2025-12-29 16:32:42 +08:00
__init__.py feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
admin.py refactor: admin api using session factory (#29628) 2025-12-15 12:01:41 +08:00
apikey.py fix: Failed to load API definition (#28509) 2025-11-24 21:44:09 +09:00
error.py Restructure the File errors in controller (#23801) 2025-08-13 17:06:07 +08:00
extension.py refactor: split changes for api/controllers/console/extension.py (#29888) 2025-12-24 09:41:42 +08:00
feature.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
files.py Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
init_validate.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
ping.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
remote_files.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
setup.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
spec.py refactor(router): apply ns.route style (#26339) 2025-09-28 13:37:06 +08:00
version.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
wraps.py fix: Login secret text transmission (#29659) 2025-12-16 16:55:51 +08:00