# getCacheKey()

[**PromptScript API**](https://getpromptscript.dev/api-reference/index.md)

***

# Function: getCacheKey()

> **getCacheKey**(`url`, `ref?`): `string`

Defined in: [resolver/src/git-url-utils.ts:245](https://github.com/mrwogu/promptscript/blob/49aa50f943865b985366c4eda6e95c5a31ef39a6/packages/resolver/src/git-url-utils.ts#L245)

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

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