Skip to content

Commit ea087e6

Browse files
authored
fixes reset issue with redis odp cache. (#388)
1 parent 5c8aefc commit ea087e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/odpcache/services/redis_cache.go

+6
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func (r *RedisCache) Save(key string, value interface{}) {
8989

9090
// Reset is used to reset segments
9191
func (r *RedisCache) Reset() {
92+
93+
// This is required since reset can be called before lookup and save for fetchQualifiedSegments
94+
if r.Client == nil {
95+
r.initClient()
96+
}
97+
9298
if r.Client != nil {
9399
r.Client.FlushDB(ctx)
94100
}

0 commit comments

Comments
 (0)