dify/api/tests/unit_tests/core/helper
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
..
code_executor Fix/template transformer line number (#27867) 2025-11-05 15:21:47 +08:00
__init__.py feat: support max_retries in jina requests (#6585) 2024-07-25 13:10:39 +08:00
test_csv_sanitizer.py fix: csv injection in annotations export (#29462) 2025-12-15 17:14:05 +08:00
test_encrypter.py orm filter -> where (#22801) 2025-07-24 00:57:45 +08:00
test_ssrf_proxy.py fix: fix use build_request lead unexpect param (#30095) 2025-12-24 17:23:30 +08:00
test_trace_id_helper.py feat(trace): support external trace id propagation (#22623) 2025-07-22 15:17:43 +08:00