MCPcopy Index your code
hub / github.com/github/github-mcp-server / WithCacheName

Function WithCacheName

pkg/lockdown/lockdown.go:69–75  ·  view source on GitHub ↗

WithCacheName overrides the cache table name used for storing entries. Use this to isolate cache entries between tenants or in tests.

(name string)

Source from the content-addressed store, hash-verified

67// WithCacheName overrides the cache table name used for storing entries.
68// Use this to isolate cache entries between tenants or in tests.
69func WithCacheName(name string) RepoAccessOption {
70 return func(c *RepoAccessCache) {
71 if name != "" {
72 c.cache = cache2go.Cache(name)
73 }
74 }
75}
76
77// NewRepoAccessCache creates a RepoAccessCache bound to the supplied clients.
78func NewRepoAccessCache(client *githubv4.Client, restClient *github.Client, opts ...RepoAccessOption) *RepoAccessCache {

Calls

no outgoing calls