feat: reset proxy cache with sigusr2
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
This commit is contained in:
@ -99,9 +99,12 @@ const proxiesCacheKey = "proxies"
|
||||
func (d *Director) getProxies(ctx context.Context) ([]*store.Proxy, error) {
|
||||
proxies, exists := d.proxyCache.Get(proxiesCacheKey)
|
||||
if exists {
|
||||
logger.Debug(ctx, "using cached proxies")
|
||||
return proxies, nil
|
||||
}
|
||||
|
||||
logger.Debug(ctx, "querying fresh proxies")
|
||||
|
||||
headers, err := d.proxyRepository.QueryProxy(ctx, store.WithProxyQueryEnabled(true))
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
@ -134,9 +137,12 @@ func (d *Director) getLayers(ctx context.Context, proxyName store.ProxyName) ([]
|
||||
|
||||
layers, exists := d.layerCache.Get(cacheKey)
|
||||
if exists {
|
||||
logger.Debug(ctx, "using cached layers")
|
||||
return layers, nil
|
||||
}
|
||||
|
||||
logger.Debug(ctx, "querying fresh layers")
|
||||
|
||||
headers, err := d.layerRepository.QueryLayers(ctx, proxyName, store.WithLayerQueryEnabled(true))
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
|
Reference in New Issue
Block a user