MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / clean

Method clean

cache/redis_cache.go:315–324  ·  view source on GitHub ↗
(stringKey string)

Source from the content-addressed store, hash-verified

313}
314
315func (r *redisCache) clean(stringKey string) {
316 delCtx, cancelFunc := context.WithTimeout(context.Background(), removeTimeout)
317 defer cancelFunc()
318 delErr := r.client.Del(delCtx, stringKey).Err()
319 if delErr != nil {
320 log.Debugf("redis item was only partially inserted and chproxy couldn't remove the partial result because of %s", delErr)
321 } else {
322 log.Debugf("redis item was only partially inserted, chproxy was able to remove it")
323 }
324}
325
326func (r *redisCache) Name() string {
327 return r.name

Callers 2

PutMethod · 0.95
TestCacheCleanFunction · 0.45

Calls 1

DebugfFunction · 0.92

Tested by 1

TestCacheCleanFunction · 0.36