feat: add persistent shared version cache for multiple connections

- Add version-cache.ts with file-based persistence
- 150 connections = 1 request (not 150) via request deduplication
- Cache survives server restarts via .baileys-version-cache.json
- Export cache utilities: getCachedVersion, refreshVersionCache, clearVersionCache
- Update makeWASocketAutoVersion to use shared cache
This commit is contained in:
Claude
2026-01-21 18:47:12 +00:00
parent 8ef129bd3d
commit 185632c053
3 changed files with 280 additions and 25 deletions
+3
View File
@@ -33,5 +33,8 @@ export * from './cache-utils'
export * from './circuit-breaker'
export * from './retry-utils'
// Version management
export * from './version-cache'
// Event streaming
export * from './baileys-event-stream'