File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,14 @@ export function getPca(
327327 }
328328 const cachedPOJO = cached && cached . asPOJO ;
329329 if ( cachedPOJO ) {
330- if ( cachedPOJO . math_tick <= ( math_tick || 0 ) ) {
330+ // When caller wants the latest data (math_tick undefined or -1), return cached data
331+ // This includes empty structures (math_tick: 0) created when no math data exists
332+ if ( math_tick === undefined || math_tick === - 1 ) {
333+ logger . silly ( "math from cache (latest requested)" , { zid, math_tick } ) ;
334+ return Promise . resolve ( cached ) ;
335+ }
336+ // When caller specifies a math_tick, only return cached data if it's newer
337+ if ( cachedPOJO . math_tick <= math_tick ) {
331338 logger . info ( "math was cached but not new" , {
332339 zid,
333340 cached_math_tick : cachedPOJO . math_tick ,
You can’t perform that action at this time.
0 commit comments