10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +01:00

Fast load time

This commit is contained in:
Anthony Scemama 2020-11-19 23:56:04 +01:00
parent 768420b677
commit 62b92912b6
3 changed files with 7 additions and 8 deletions

View File

@ -6,9 +6,8 @@ class Geometry {
static async loadXYZAsync(file) {
switch (trueTypeOf(file)) {
case String.name:
file = getFullDataPath("/structures/"+file)
const maxAge= (DebugMode.Enabled,0,600)
var str = await getTextFromFileUrlAsync(file,{"Cache-Control":`max-age=${maxAge}`})
file = getFullDataPath("structures"+file)
var str = getTextFromFileUrl(file)
break;
case File.name:
var str = await getTextFromUploadedFileAsync(file)

View File

@ -281,7 +281,7 @@ class dataFileBase {
file = getFullDataPath(file)
// const maxAge= (DebugMode.Enabled,0,600)
// var str = await getTextFromFileUrlAsync(file,{"Cache-Control":`max-age=${maxAge}`})
var str = await getTextFromFileUrl(file)
var str = getTextFromFileUrl(file)
break;
case File.name:
var str = await getTextFromUploadedFileAsync(file)