WithCacheName overrides the cache table name used for storing entries. Use this to isolate cache entries between tenants or in tests.
(name string)
| 67 | // WithCacheName overrides the cache table name used for storing entries. |
| 68 | // Use this to isolate cache entries between tenants or in tests. |
| 69 | func 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. |
| 78 | func NewRepoAccessCache(client *githubv4.Client, restClient *github.Client, opts ...RepoAccessOption) *RepoAccessCache { |
no outgoing calls