Metabase: Ability to override an individual question's cache TTL

Created on 31 Mar 2017  路  3Comments  路  Source: metabase/metabase

This was mentioned #4490, but we're spinning it out into its own issue. An admin should have the ability on an individual saved question to override the cache TTL duration if the question is being cached.

Design:

dd9dff8a-147f-11e7-9756-7ca1d5eaee66

OrganizatioSaved Questions New Feature Performance

Most helpful comment

@mazameli This would be great for us. Hopefully it would also work for raw sql questions.

In addition to this, it would be neat if Metabase could keep a cron and re-run queries in the background on a schedule. So when loading a dashboard, if the user chose to cache the question every 5 minutes, the user is always loading the question from cache which should be instant.

In your design diagram maybe it would be similar to CACHE TTL, called "CACHE IN BACKGROUND EVERY n".

If others think that would be useful I could create a separate issue, but just wanted to get your thoughts?

All 3 comments

@mazameli This would be great for us. Hopefully it would also work for raw sql questions.

In addition to this, it would be neat if Metabase could keep a cron and re-run queries in the background on a schedule. So when loading a dashboard, if the user chose to cache the question every 5 minutes, the user is always loading the question from cache which should be instant.

In your design diagram maybe it would be similar to CACHE TTL, called "CACHE IN BACKGROUND EVERY n".

If others think that would be useful I could create a separate issue, but just wanted to get your thoughts?

@mazameli could you be so kind and tell what options for background cron there are?
I mean, right now I see three options:

  1. run cron which opens the queistion URL - this would force MB to update (but this is rather badish version)
  2. run cron which would go into the MB Database and update there needed tables
  3. right something on clojure

Do you see more options?

Hey! Great project. We are very interested in the possibility to specify cache_ttl on individual questions as discussed here among other places. I was wondering if it's possible to get an ETA or an update on this.

Was this page helpful?
0 / 5 - 0 ratings