Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkg/cmd/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ func formatCachesSummary(serviceList []string, dataFetcher fetcher.Fetcher) (str
if ignoreSpecialCaches {
finalList := make([]config.CacheSummaryDetail, 0)
for _, v := range allCachesSummary {
if !strings.Contains(v.CacheName, "$") {
if !isSpecialCache(v.CacheName) {
finalList = append(finalList, v)
}
}
Expand All @@ -936,6 +936,13 @@ func formatCachesSummary(serviceList []string, dataFetcher fetcher.Fetcher) (str
return value, err
}

var specialCacheNames = []string{"executor-assignments", "executor-tasks", "executor-executors"}

// isSpecialCache returns true if a cache is a "special" or internal cache
func isSpecialCache(cacheName string) bool {
return strings.Contains(cacheName, "$") || utils.SliceContains(specialCacheNames, cacheName)
}

// formatViewCachesSummary returns the formatted view caches for the service list.
func formatViewCachesSummary(serviceList []string, dataFetcher fetcher.Fetcher) (string, error) {
allCachesSummary, err := getViewCaches(serviceList, dataFetcher)
Expand Down
Loading