|
@@ -404,6 +404,10 @@
|
|
};
|
|
};
|
|
cacheDbConn.onsuccess = function(event) {
|
|
cacheDbConn.onsuccess = function(event) {
|
|
cacheDb = event.target.result
|
|
cacheDb = event.target.result
|
|
|
|
+
|
|
|
|
+ //Database connection established.
|
|
|
|
+ //Clear old cache in the system if any
|
|
|
|
+ clearExpiredCache();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2334,7 +2338,9 @@
|
|
//Delete those cache that have expired
|
|
//Delete those cache that have expired
|
|
expiredFilenames.forEach(function(filenameToBeDeleted){
|
|
expiredFilenames.forEach(function(filenameToBeDeleted){
|
|
removeCacheByFilename(filenameToBeDeleted);
|
|
removeCacheByFilename(filenameToBeDeleted);
|
|
- })l
|
|
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ console.log("[AirMusic] Cache clearning cycle completed")
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2763,7 +2769,7 @@
|
|
window.addEventListener('popstate', handleBackButton);
|
|
window.addEventListener('popstate', handleBackButton);
|
|
window.history.pushState({}, '');
|
|
window.history.pushState({}, '');
|
|
|
|
|
|
- //Clear expired cache
|
|
|
|
|
|
+
|
|
|
|
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|