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

Method GetCacheStats

internal/db/db.go:210–214  ·  view source on GitHub ↗

GetCacheStats returns (count, totalBytes) for pricing_cache.

()

Source from the content-addressed store, hash-verified

208
209// GetCacheStats returns (count, totalBytes) for pricing_cache.
210func (d *DB) GetCacheStats() (int, int, error) {
211 var count, size int
212 err := d.conn.QueryRow("SELECT COUNT(*), COALESCE(SUM(LENGTH(response_json)),0) FROM pricing_cache").Scan(&count, &size)
213 return count, size, err
214}
215
216// MakeCacheKey produces a deterministic cache key from query parameters.
217func MakeCacheKey(providers, regions, categories, productFamilies []string, attrs map[string]string, prices []string) string {

Callers 2

ViewMethod · 0.80
runCacheStatsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected