engine/app_cache_invalidate

Prefix-scoped invalidation of static file cache and gbox transpile/instance caches for the calling app. Engine-internal.
Description:
  • Prefix-scoped invalidation of static file cache and gbox transpile/instance caches for the calling app. Engine-internal.

Methods

(async, inner) applyInvalidateOnMaster(appName, staticAbsPrefixes, scriptAbsPrefixes) → {Promise.<{static: number, scripts: {transpile: number, instance: number}}>}

Description:
  • Master-side apply: static provider clear + local script caches + broadcast to workers. Prefixes must already be absolute jailed paths.
Parameters:
Name Type Description
appName string
staticAbsPrefixes Array.<string>
scriptAbsPrefixes Array.<string>
Returns:
Type
Promise.<{static: number, scripts: {transpile: number, instance: number}}>

(inner) invalidateScriptPrefixesLocal(appName, absPrefixes) → {Object}

Description:
  • Clear transpile + instance caches for prefixes on this process.
Parameters:
Name Type Description
appName string
absPrefixes Array.<string>
Returns:
Type
Object

(async, inner) invalidateStaticPrefixes(absPrefixes) → {Promise.<number>}

Description:
  • Clear static:${abs}… keys for each prefix via the cache provider.
Parameters:
Name Type Description
absPrefixes Array.<string>
Returns:
number of prefixes cleared
Type
Promise.<number>

(inner) resolvePrefixes(scope, prefixes, app) → {Array.<string>}

Description:
  • Resolve user path prefixes to absolute paths using fs BOX/WEB rules.
Parameters:
Name Type Description
scope string SCOPES.BOX or SCOPES.WEB
prefixes Array.<string>
app object
Returns:
Type
Array.<string>