Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for newCachingRepo (0.14 sec)

  1. src/cmd/go/internal/modfetch/repo.go

    func Lookup(ctx context.Context, proxy, path string) Repo {
    	if traceRepo {
    		defer logCall("Lookup(%q, %q)", proxy, path)()
    	}
    
    	return lookupCache.Do(lookupCacheKey{proxy, path}, func() Repo {
    		return newCachingRepo(ctx, path, func(ctx context.Context) (Repo, error) {
    			r, err := lookup(ctx, proxy, path)
    			if err == nil && traceRepo {
    				r = newLoggingRepo(r)
    			}
    			return r, err
    		})
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 16:36:19 UTC 2023
    - 15.2K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modfetch/cache.go

    	latestCache   par.ErrCache[struct{}, *RevInfo]
    	gomodCache    par.ErrCache[string, []byte]
    
    	once     sync.Once
    	initRepo func(context.Context) (Repo, error)
    	r        Repo
    }
    
    func newCachingRepo(ctx context.Context, path string, initRepo func(context.Context) (Repo, error)) *cachingRepo {
    	return &cachingRepo{
    		path:     path,
    		initRepo: initRepo,
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 24.7K bytes
    - Viewed (0)
Back to top