dify/api/tests/unit_tests
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
..
configs feat: update HTTP timeout configurations and enhance timeout input handling in UI (#26685) 2025-10-10 09:00:06 +08:00
controllers fix(api): remove tool provider list cache to fix cache inconsistency 2025-12-29 16:32:42 +08:00
core fix(api): remove tool provider list cache to fix cache inconsistency 2025-12-29 16:32:42 +08:00
extensions add service layer OTel Span (#28582) 2025-12-05 21:58:32 +08:00
factories hotfix: fix _extract_filename for rfc 5987 (#26230) 2025-11-27 10:54:00 +08:00
libs fix: Login secret text transmission (#29659) 2025-12-16 16:55:51 +08:00
models perf: remove the n+1 query (#29483) 2025-12-11 15:18:27 +08:00
oss test: Consolidate API CI test runner (#29440) 2025-12-15 13:20:31 +08:00
repositories Enhanced GraphEngine Pause Handling (#28196) 2025-11-26 19:59:34 +08:00
services feat: make the SegmentService.get_segments sort stable (#30152) 2025-12-25 15:53:38 +08:00
tasks fix: update Notion credential retrieval in document indexing sync task (#29933) 2025-12-21 16:51:24 +08:00
tools feat: MCP tool adds support for embeddedResource (#30261) 2025-12-29 10:15:47 +08:00
utils chore: update remove_leading_symbols pattern, keep 【 (#29419) 2025-12-11 09:47:39 +08:00
.gitignore Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
conftest.py test: Consolidate API CI test runner (#29440) 2025-12-15 13:20:31 +08:00