Commit 5e0f801
fix: make PhoneRistrettoCache a singleton to prevent stale cache entries
Same bug pattern as UserRistrettoCache — PhoneRistrettoCache() created
a new ristretto cache on every call. PhoneRepository is used by
PhoneService, PhoneAPIKeyService, and NotificationService, each getting
a separate cache. Cache invalidations (Clear/Del) in one service had
no effect on the others, leading to stale phone data.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a3889cd commit 5e0f801
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
1717 | 1718 | | |
1718 | 1719 | | |
1719 | 1720 | | |
1720 | | - | |
1721 | | - | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1722 | 1726 | | |
1723 | 1727 | | |
1724 | 1728 | | |
| |||
1727 | 1731 | | |
1728 | 1732 | | |
1729 | 1733 | | |
| 1734 | + | |
1730 | 1735 | | |
1731 | 1736 | | |
1732 | 1737 | | |
| |||
0 commit comments