MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / runCacheStats

Function runCacheStats

cmd/cache.go:45–60  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

43}
44
45func runCacheStats(cmd *cobra.Command, args []string) error {
46 database, err := db.New()
47 if err != nil {
48 return err
49 }
50 defer database.Close()
51
52 count, size, err := database.GetCacheStats()
53 if err != nil {
54 return err
55 }
56 sizeMB := float64(size) / 1024 / 1024
57 fmt.Printf("Cache entries: %d\n", count)
58 fmt.Printf("Cache size: %.2f MB\n", sizeMB)
59 return nil
60}

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
CloseMethod · 0.80
GetCacheStatsMethod · 0.80

Tested by

no test coverage detected