Skip to content

Commit

Permalink
filter out disabled caches
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvigee committed Apr 22, 2024
1 parent 3f7a459 commit ae40dc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rcache/cache_selection.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func (c orderCacheContainer) calculateLatency(ctx context.Context) (time.Duratio
}

func orderCaches(ctx context.Context, caches []CacheConfig) []CacheConfig {
caches = ads.Filter(caches, func(cc CacheConfig) bool {
return cc.Read || cc.Write
})

if len(caches) <= 1 {
return caches
}
Expand Down

0 comments on commit ae40dc3

Please sign in to comment.