lampepfl / bench

benchmark compilation of Dotty
https://dotty-bench.epfl.ch
17 stars 8 forks source link

Fix caching of json assets for the new benchmarking machine web server #1193

Closed liufengyun closed 3 years ago

liufengyun commented 3 years ago

In https://github.com/lampepfl/dotty/pull/12242, when we have multiple tests for the same PR, the data points not shown unless we clear the cache.

It used to work for the old benchmarking machine because we published the web on github pages.

With the new machine, we publish the website locally -- we need to update the settings of the webserver so that users don't need to clear the cache.

liufengyun commented 3 years ago

Setting the following HTTP header in the web server will suffice:

Cache-Control: no-cache

The value no-cache will first check whether the JSON file is valid before reusing it.

Doc: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching#controlling_caching

liufengyun commented 3 years ago

Already set