Beginning of a way to disable client cache
This is so that share links don't clobber local storage, some day.main
parent
c63ddbda5c
commit
599f055910
|
@ -1,17 +1,23 @@
|
|||
// custom javascript
|
||||
var cacheEnabled = false;
|
||||
|
||||
var updateCache = function() {
|
||||
window.localStorage.setItem('cache', cache);
|
||||
if (cacheEnabled) {
|
||||
window.localStorage.setItem('cache', cache);
|
||||
}
|
||||
}
|
||||
|
||||
var primeCache = function() {
|
||||
var string = window.localStorage.getItem('cache') || "";
|
||||
var strCache = string.split(",");
|
||||
var cache = [];
|
||||
strCache.map(function(item) {
|
||||
cache[cache.length] = (item == 'true');
|
||||
setRowValue(cache.length, cache[cache.length-1]);
|
||||
});
|
||||
if (cacheEnabled) {
|
||||
var string = window.localStorage.getItem('cache') || "";
|
||||
var strCache = string.split(",");
|
||||
cache = [];
|
||||
strCache.map(function(item) {
|
||||
cache[cache.length] = (item == 'true');
|
||||
setRowValue(cache.length, cache[cache.length-1]);
|
||||
});
|
||||
} else {
|
||||
cache = [];
|
||||
}
|
||||
}
|
||||
primeCache();
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ def load_run_cache():
|
|||
def fetch_runs():
|
||||
try:
|
||||
logger.warn("Re-fetching cache")
|
||||
r = requests.get(TRACKER_URL, timeout=3)
|
||||
r = requests.get(TRACKER_URL, timeout=5)
|
||||
if r.status_code != 200:
|
||||
raise GDQException("GDQ not returning 200")
|
||||
output = r.json()
|
||||
|
|
Loading…
Reference in New Issue