Skip to content

Commit f12d5fb

Browse files
authored
Add ability to provide max-length for cache-storage option (#329)
1 parent c1891d6 commit f12d5fb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/cmd/cache.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var (
3535
cannotFindViewCache = "no view cache named %s exists for service %s"
3636
cacheSummary bool
3737
showQueryParam bool
38+
maxLengthParam int
3839
)
3940

4041
const (
@@ -1190,6 +1191,7 @@ func init() {
11901191
getCacheAccessCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
11911192
getCacheStorageCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
11921193
getCacheStorageCmd.Flags().BoolVarP(&showQueryParam, "query", "q", false, "show query details in full")
1194+
getCacheStorageCmd.Flags().IntVarP(&maxLengthParam, "max-length", "", 256, "set max length for full query")
11931195
getCacheIndexesCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
11941196
getCachePartitionsCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
11951197
getCachePartitionsCmd.Flags().BoolVarP(&cacheSummary, "summary", "S", false, "show a cache summary")

pkg/cmd/formatting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ func FormatCacheDetailsStorage(cacheDetails []config.CacheDetail) string {
10201020
}
10211021

10221022
if showQueryParam {
1023-
maxLength = 250
1023+
maxLength = maxLengthParam
10241024
}
10251025

10261026
table := newFormattedTable().WithHeader(NodeIDColumn, "TIER", "LOCKS GRANTED", "LOCKS PENDING", "KEY LISTENERS",

0 commit comments

Comments
 (0)