It uses CacheHandler, mirror
Created
February 13, 2017 03:45
-
-
Save oshliaer/e8d988b96da993502b06fb26eeff0b43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadlib(libUrl) { | |
var cacheHandler = new CacheHandler(21600, CacheService.getScriptCache()); | |
if ((typeof alasql) === 'undefined') { | |
var cs = cacheHandler.getCache(libUrl); | |
if (!cs) { | |
Logger.log('New cache'); | |
cs = UrlFetchApp.fetch(libUrl).getContentText(); | |
cacheHandler.putCache(cs, libUrl); | |
} | |
eval(cs); | |
} | |
} | |
loadlib('https://raw.githubusercontent.com/agershun/alasql/develop/dist/alasql.min.js') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment