Home / Function/ findPathItemByKey() — astro Function Reference

findPathItemByKey() — astro Function Reference

Architecture documentation for the findPathItemByKey() function in route-cache.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  4392ef0b_011f_79b9_d363_083f4a8dabef["findPathItemByKey()"]
  2f0e5468_ae4d_5ec1_61b2_b1f585819620["route-cache.ts"]
  4392ef0b_011f_79b9_d363_083f4a8dabef -->|defined in| 2f0e5468_ae4d_5ec1_61b2_b1f585819620
  5182e483_bd8d_1680_67cd_f665386c9d74["get()"]
  4392ef0b_011f_79b9_d363_083f4a8dabef -->|calls| 5182e483_bd8d_1680_67cd_f665386c9d74
  style 4392ef0b_011f_79b9_d363_083f4a8dabef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/render/route-cache.ts lines 124–137

export function findPathItemByKey(
	staticPaths: GetStaticPathsResultKeyed,
	params: Params,
	route: RouteData,
	logger: Logger,
	trailingSlash: AstroConfig['trailingSlash'],
) {
	const paramsKey = stringifyParams(params, route, trailingSlash);
	const matchedStaticPath = staticPaths.keyed.get(paramsKey);
	if (matchedStaticPath) {
		return matchedStaticPath;
	}
	logger.debug('router', `findPathItemByKey() - Unexpected cache miss looking for ${paramsKey}`);
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does findPathItemByKey() do?
findPathItemByKey() is a function in the astro codebase, defined in packages/astro/src/core/render/route-cache.ts.
Where is findPathItemByKey() defined?
findPathItemByKey() is defined in packages/astro/src/core/render/route-cache.ts at line 124.
What does findPathItemByKey() call?
findPathItemByKey() calls 1 function(s): get.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free