MCPcopy
hub / github.com/github/github-mcp-server / WithTTL

Function WithTTL

pkg/lockdown/lockdown.go:54–58  ·  view source on GitHub ↗

WithTTL overrides the default TTL applied to cache entries. A non-positive duration disables expiration.

(ttl time.Duration)

Source from the content-addressed store, hash-verified

52// WithTTL overrides the default TTL applied to cache entries. A non-positive
53// duration disables expiration.
54func WithTTL(ttl time.Duration) RepoAccessOption {
55 return func(c *RepoAccessCache) {
56 c.ttl = ttl
57 }
58}
59
60// WithLogger sets the logger used for cache diagnostics.
61func WithLogger(logger *slog.Logger) RepoAccessOption {

Callers 4

RunHTTPServerFunction · 0.92
stubRepoAccessCacheFunction · 0.92
createGitHubClientsFunction · 0.92
newMockRepoAccessCacheFunction · 0.85

Calls

no outgoing calls

Tested by 2

stubRepoAccessCacheFunction · 0.74
newMockRepoAccessCacheFunction · 0.68