Fix calculation in `ttl-hierarchy` (#18495)
Fix calculation in `ttl-hierarchy` The `ttl-hierarchy` function falls back to `query-magic-ttl` if no stored (card, dashboard, database) cache settings are available. But that function returns its TTL value in milliseconds, while the model level, granular TTLs are stored in hours. Convert those to seconds before returning, so that `ttl-hierarchy` is always returning in seconds Add backend test for this scenario (no stored model ttls, but an average query execution time is available, and hence the `query-magic-ttl` should be used) Unskip Cypress repro
Showing
- frontend/test/metabase/scenarios/admin/settings/cache.cy.spec.js 1 addition, 1 deletion...d/test/metabase/scenarios/admin/settings/cache.cy.spec.js
- src/metabase/api/card.clj 6 additions, 4 deletionssrc/metabase/api/card.clj
- test/metabase/api/card_test.clj 8 additions, 0 deletionstest/metabase/api/card_test.clj
Loading
Please register or sign in to comment