Skip to content

fix: refresh daemon contacts when cache changes#60

Open
liyunpeng84 wants to merge 3 commits into
jackwener:mainfrom
liyunpeng84:fix-refresh-daemon-contacts
Open

fix: refresh daemon contacts when cache changes#60
liyunpeng84 wants to merge 3 commits into
jackwener:mainfrom
liyunpeng84:fix-refresh-daemon-contacts

Conversation

@liyunpeng84
Copy link
Copy Markdown

Summary

  • Refresh the daemon's in-memory contact cache when contact/contact.db changes on disk.
  • Centralize message database key discovery in DbCache so startup and refresh paths use the same logic.
  • Use a write-lock double-check during contact refresh to avoid duplicate concurrent reloads.

Test plan

  • cargo check

🤖 Generated with Claude Code

liyunpeng and others added 3 commits May 14, 2026 21:32
Refresh the in-memory contact cache when contact.db changes so long-running daemon sessions pick up updated names and verification flags without a restart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Avoid refreshing contacts for daemon requests that do not need names, and invalidate the contact cache entry when reload fails so the next request retries instead of staying stale.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant