ClearAll deletes all history and pricing cache.
()
| 164 | |
| 165 | // ClearAll deletes all history and pricing cache. |
| 166 | func (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. |
| 175 | func (d *DB) GetCache(cacheKey string) (*api.PricingAPIResponse, error) { |
no outgoing calls
no test coverage detected