Renamed cache storages

This commit is contained in:
Jori Lallo
2016-08-19 08:34:45 -07:00
parent 28089dc6e5
commit 7fb112cf42

View File

@@ -53,9 +53,17 @@ Cache.prototype.addAll||(Cache.prototype.addAll=function(t){function e(t){this.n
'use strict';
// Assets
global.toolbox.router.get(/\/static\//, global.toolbox.cacheFirst);
global.toolbox.router.get(/\/static\//, global.toolbox.cacheFirst, { cache: { name: 'static' } });
global.toolbox.router.get('/(.*)', global.toolbox.fastest, {origin: 'https://secure.gravatar.com'});
// API
global.toolbox.router.get(/\/api\//, global.toolbox.networkFirst, {
cache: {
name: 'api',
maxEntries: 100
}
});
// API GET calls
global.toolbox.router.default = global.toolbox.networkFirst;