Skip to content

PromptScript API


Function: createGitCacheManager()

createGitCacheManager(options): GitCacheManager

Defined in: resolver/src/git-cache-manager.ts:350

Create a new GitCacheManager instance.

Parameters

options

GitCacheManagerOptions = {}

Cache manager options

Returns

GitCacheManager

GitCacheManager instance

Example

const cache = createGitCacheManager({
  cacheDir: '/custom/cache/path',
  ttl: 1800000, // 30 minutes
});

// Check if cache is valid
const isValid = await cache.isValid('https://github.com/org/repo.git', 'main');

// Get or create cache
const entry = await cache.get('https://github.com/org/repo.git', 'main');