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

Method ClearAll

internal/db/db.go:166–172  ·  view source on GitHub ↗

ClearAll deletes all history and pricing cache.

()

Source from the content-addressed store, hash-verified

164
165// ClearAll deletes all history and pricing cache.
166func (d *DB) ClearAll() error {
167 if _, err := d.conn.Exec("DELETE FROM query_history"); err != nil {
168 return err
169 }
170 _, err := d.conn.Exec("DELETE FROM pricing_cache")
171 return err
172}
173
174// GetCache returns a cached pricing response for the given key if not expired.
175func (d *DB) GetCache(cacheKey string) (*api.PricingAPIResponse, error) {

Callers 2

handleHistoryEventMethod · 0.80
runCacheClearFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected