Skip to content

PromptScript API


Function: getCacheKey()

getCacheKey(url, ref?): string

Defined in: resolver/src/git-url-utils.ts:245

Generate a deterministic cache key for a Git URL.

Parameters

url

string

Git URL

ref?

string

Optional Git ref (branch/tag/commit)

Returns

string

Cache key string

Example

getCacheKey('https://github.com/org/repo.git', 'main');
// 'github.com-org-repo-main-abc123'