MCPcopy
hub / github.com/zu1k/proxypool / GetProxies

Function GetProxies

internal/cache/cache.go:12–18  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

10var c = cache.New(cache.NoExpiration, 10*time.Minute)
11
12func GetProxies(key string) proxy.ProxyList {
13 result, found := c.Get(key)
14 if found {
15 return result.(proxy.ProxyList)
16 }
17 return nil
18}
19
20func SetProxies(key string, proxies proxy.ProxyList) {
21 c.Set(key, proxies, cache.NoExpiration)

Callers 2

CrawlGoFunction · 0.92
setupRouterFunction · 0.92

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected