Cache type causing issues?

It seemed from when I looked at the github that the minimum cache length requires an integer. I wanted to run an extremely high traffic metabase dashboard and have it cache all queries, even ones that are shorter than one second, for 30 seconds at least. If I’m correct maybe a double or caching all if it’s set to 0 would be nice.

I don’t think it’s caching when set to None/0 because my install at http://wsb.gold kept falling over until we stopped sending people to it.

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.9.1+1-Ubuntu-0ubuntu1.18.04",
    "java.vendor": "Ubuntu",
    "java.vendor.url": "https://ubuntu.com/",
    "java.version": "11.0.9.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.9.1+1-Ubuntu-0ubuntu1.18.04",
    "os.name": "Linux",
    "os.version": "4.15.0-132-generic",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  },
  "metabase-info": {
    "databases": [
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "12.5"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2021-01-13",
      "tag": "v0.37.6",
      "branch": "release-x.37.x",
      "hash": "344e5e0"
    },
    "settings": {
      "report-timezone": "US/Eastern"
    }
  }
}

Hi @zjz
Use 0.001 for example for Duration.
That will put a high load on your application database instead of your data source, but you should read this article for more information about scaling and tweaking:
https://www.metabase.com/learn/data-diet/analytics/metabase-at-scale.html

Am I missing something? When I try putting anything smaller than 1 in that field it seems to default to 1. That’s why I was saying a double instead of an integer since it just multiplies it by 1000 ms in the code anyway, I think.

Am I missing some part of that page that says how to set it lower than 1?

@zjz I cannot reproduce in Chrome with English localization (or Firefox). Otherwise set the key query-caching-min-ttl manually in the table setting of the application database.