10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-22 18:57:38 +02:00

check if url is in cache

This commit is contained in:
Anthony Scemama 2020-11-30 00:17:08 +01:00
parent 008da4490a
commit c085809936

View File

@ -10,7 +10,11 @@ var fileCache = function () {
_cache = fileCache();
function getTextFromFileUrl(url,header={}) {
return _cache[url];
if (url in _cache) {
return _cache[url];
} else {
return async () => {await getTextFromFileUrlAsync(url)};
}
}