Skip to content

Interface: CompileOptions

API / @xmachines/play-router / index / CompileOptions

Defined in: packages/play-url/src/url-pattern-utils.ts:106

What getCompiledPattern reads: ParseOptions with the compiled cache.

A caller holds ONE object and hands it to every call of the routing layer, because RouteMapOptions and RouterBridgeOptions extend this one in turn.

Extends

Extended by

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
compiledCache?readonlyPatternCache<URLPatternLike>The cache of the COMPILED URLPattern, which is what this function returns. The default is a cache that this module shares with every caller of the process. Pass one to give a tenant or a request a compilation that no other evicts, and pass { get: () => undefined, set: () => {} } to compile each time. A caller that passes patternCache for isolation passes this one too. The compiled cache is read FIRST, so a hit on it answers before the parse runs at all — a passed parse cache alone therefore isolates nothing once another caller has compiled the same pattern.-packages/play-url/src/url-pattern-utils.ts:119
patternCache?readonlyPatternCache<ParsedPattern>The cache of the PARSE of a pattern. The default is the cache that this package shares with every caller of the process.ParseOptions.patternCachepackages/play-pattern/src/cache.ts:40