@@ -14,8 +14,8 @@ import {
1414import { PropUtils } from '../utils/prop/PropUtils' ;
1515import { type PropPath } from '../utils/prop/PropPath' ;
1616
17- export const metadataCacheUpdateCycleThreshold = 5 ; // {syncInterval (200)} * 5 = 1s
18- export const metadataCacheInactiveCycleThreshold = 5 * 60 ; // {syncInterval (200)} * 5 * 60 = 1 minute
17+ export const METADATA_CACHE_UPDATE_CYCLE_THRESHOLD = 5 ; // {syncInterval (200)} * 5 = 1s
18+ export const METADATA_CACHE_INACTIVE_CYCLE_THRESHOLD = 5 * 60 ; // {syncInterval (200)} * 5 * 60 = 1 minute
1919
2020/**
2121 * Checks if bind target `b` should receive an update when bind target `a` changes.
@@ -127,7 +127,7 @@ export class MetadataManager {
127127 extraCache : extraCache ,
128128 metadata : metadata ,
129129 subscriptions : [ subscription ] ,
130- cyclesSinceLastChange : metadataCacheUpdateCycleThreshold + 1 , // +1, so that is it bigger than the threshold
130+ cyclesSinceLastChange : METADATA_CACHE_UPDATE_CYCLE_THRESHOLD + 1 , // +1, so that is it bigger than the threshold
131131 cyclesSinceInactive : 0 ,
132132 inactive : false ,
133133 changed : false ,
@@ -357,7 +357,7 @@ export class MetadataManager {
357357 if ( cacheEntry . inactive ) {
358358 cacheEntry . cyclesSinceInactive += 1 ;
359359 }
360- if ( cacheEntry . cyclesSinceInactive > metadataCacheInactiveCycleThreshold ) {
360+ if ( cacheEntry . cyclesSinceInactive > METADATA_CACHE_INACTIVE_CYCLE_THRESHOLD ) {
361361 markedForDelete . push ( filePath ) ;
362362 }
363363 }
@@ -430,7 +430,7 @@ export class MetadataManager {
430430 }
431431
432432 // don't update if the user recently changed the cache
433- if ( fileCache . cyclesSinceLastChange < metadataCacheUpdateCycleThreshold ) {
433+ if ( fileCache . cyclesSinceLastChange < METADATA_CACHE_UPDATE_CYCLE_THRESHOLD ) {
434434 return ;
435435 }
436436
0 commit comments