Currently we are getting all the Grafana CSS (no browser cache) everytime we load Grafana iframe, because of this line:
'grafana.light.min.css?cache-buster={}'.format(int(time.time()))
The "cache-buster" parameter was originally created as a temporary solution, to guarantee that browser will not cache this file, so we always use the latest Grafana CSS (important if Grafana is upgraded).
Now we need to find a better solution because the load of the Grafana iframe is very slow.
Possible solutions:
Solution 1
openATTIC should know the name of the file that contains the hash on the filename, and use it (e.g. "grafana.light.min.fc104690.css"). This will guarantee that we always use the latest CSS, and the browser will cache it until the hash change.
Solution 2
If Solution 1 is not feasible, use Grafana version in cache-buster parameter:
'grafana.light.min.css?cache-buster={}'.format(grafana_version)
Solution 3
If Solution 2 is not feasible, use openATTIC version in cache-buster parameter:
'grafana.light.min.css?cache-buster={}'.format(openattic_version)