mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
feat(analytics): replace health score with reference composite
This commit is contained in:
1 parent
666a85d311
commit
c91558f18f
87 files changed
+6033
-5868
No files matched your search
Vendored
+10
@@ -185,6 +185,16 @@ export function invalidateUserMedications(
|
||||
caches.insightsTargets.deleteByPrefix(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hard-evict every server cache that can carry the derived Health Score.
|
||||
* Lab, assessment and score-notice mutations call this one bundle so the
|
||||
* analytics report, dashboard snapshot and derived batch cannot disagree.
|
||||
*/
|
||||
export function invalidateUserHealthScore(userId: string): void {
|
||||
caches.analytics.deleteByPrefix(`${userId}|`);
|
||||
caches.insightsDerived.deleteByPrefix(`${userId}|`);
|
||||
}
|
||||
|
||||
/**
|
||||
* v1.16.8 — invalidate every cache whose payload derives from the user's
|
||||
* PROFILE-level settings rather than from measurement / mood / medication
|
||||
|
||||
Reference in new issue
Block a user