*/
cacheBootResources?: boolean;
/**
+ * Delay of the purge of the cached resources in milliseconds. Default is 10000 (10 seconds).
+ */
+ cachedResourcesPurgeDelay?: number;
+ /**
* Configures use of the `integrity` directive for fetching assets
*/
disableIntegrityCheck?: boolean;
config.debugLevel = -1;
}
+ if (config.cachedResourcesPurgeDelay === undefined) {
+ config.cachedResourcesPurgeDelay = 10000;
+ }
+
// Default values (when WasmDebugLevel is not set)
// - Build (debug) => debugBuild=true & debugLevel=-1 => -1
// - Build (release) => debugBuild=true & debugLevel=0 => 0
if (loaderHelpers.config.debugLevel !== 0 && loaderHelpers.config.cacheBootResources) {
loaderHelpers.logDownloadStatsToConsole();
}
- const afterStartupRushIsOver = 10000;// 10 seconds
+
setTimeout(() => {
loaderHelpers.purgeUnusedCacheEntriesAsync(); // Don't await - it's fine to run in background
- }, afterStartupRushIsOver);
+ }, loaderHelpers.config.cachedResourcesPurgeDelay);
// call user code
try {
*/
cacheBootResources?: boolean,
/**
+ * Delay of the purge of the cached resources in milliseconds. Default is 10000 (10 seconds).
+ */
+ cachedResourcesPurgeDelay?: number,
+ /**
* Configures use of the `integrity` directive for fetching assets
*/
disableIntegrityCheck?: boolean,