docs: move lazy analytics cache to redis
This commit is contained in:
@@ -42,11 +42,15 @@ A deterministic numerical measure with a definition, source fields, filters, per
|
||||
|
||||
## Analytics Projection
|
||||
|
||||
A rebuildable summary derived from normalized source-of-truth records to answer an approved metric efficiently. A projection is not independent business truth.
|
||||
A rebuildable, versioned analytics result derived from normalized PostgreSQL facts and cached in Redis for one merchant/cohort revision. It is not independent business truth.
|
||||
|
||||
## Analytics Revision
|
||||
|
||||
A monotonically increasing merchant or cohort version changed when a related payment fact is inserted. Cached projections record the revision they represent; a revision mismatch makes them stale and triggers lazy recomputation on the next relevant dashboard request.
|
||||
A monotonically increasing PostgreSQL merchant or cohort version changed when a related payment fact is inserted. Redis cache keys include the revisions they represent; a mismatch causes request-triggered section jobs to calculate new keys while older keys expire through TTL.
|
||||
|
||||
## Analytics Section
|
||||
|
||||
One independently calculable and deliverable part of the dashboard, such as overview, payment performance, fees, or peer comparison. All core sections start on first dashboard access and become visible independently through authenticated SSE events.
|
||||
|
||||
## Peer Cohort
|
||||
|
||||
|
||||
Reference in New Issue
Block a user