mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-26 15:12:06 +00:00
Merge pull request #92910 from soltysh/kubectl_cache
Setup cache dirs properly based on --cache-dir value Kubernetes-commit: 7d1daa09383d32fe7a325d6275d9bd51cba45ee5
This commit is contained in:
commit
7392b9857a
@ -268,8 +268,6 @@ func (d *CachedDiscoveryClient) Invalidate() {
|
||||
// CachedDiscoveryClient cache data. If httpCacheDir is empty, the restconfig's transport will not
|
||||
// be updated with a roundtripper that understands cache responses.
|
||||
// If discoveryCacheDir is empty, cached server resource data will be looked up in the current directory.
|
||||
// TODO(juanvallejo): the value of "--cache-dir" should be honored. Consolidate discoveryCacheDir with httpCacheDir
|
||||
// so that server resources and http-cache data are stored in the same location, provided via config flags.
|
||||
func NewCachedDiscoveryClientForConfig(config *restclient.Config, discoveryCacheDir, httpCacheDir string, ttl time.Duration) (*CachedDiscoveryClient, error) {
|
||||
if len(httpCacheDir) > 0 {
|
||||
// update the given restconfig with a custom roundtripper that
|
||||
|
Loading…
Reference in New Issue
Block a user