Commit 63b7263 1 parent cc8e23a commit 63b7263 Copy full SHA for 63b7263
File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1209,6 +1209,10 @@ namespace eveui {
1209
1209
function cache_request ( key : string ) : JQueryPromise < any > {
1210
1210
let url : string ;
1211
1211
let jsonp = false ;
1212
+ let custom_cache =
1213
+ key . startsWith ( '/v3/universe/types' )
1214
+ || key . startsWith ( '/v1/dogma/attributes' )
1215
+ || key . startsWith ( 'osmium' ) ;
1212
1216
1213
1217
if ( key . startsWith ( 'osmium:' ) ) {
1214
1218
jsonp = true ;
@@ -1237,7 +1241,7 @@ namespace eveui {
1237
1241
url ,
1238
1242
{
1239
1243
dataType : dataType ,
1240
- cache : true ,
1244
+ cache : ! custom_cache , // if this request is not going to be cached manually, allow the browser to cache it
1241
1245
}
1242
1246
) . done (
1243
1247
function ( data ) {
@@ -1248,11 +1252,7 @@ namespace eveui {
1248
1252
1249
1253
if ( db ) { // indexedDB is ready
1250
1254
// only manually cache keypaths where the data doesn't change until the server version changes
1251
- if (
1252
- key . startsWith ( '/v3/universe/types' )
1253
- || key . startsWith ( '/v1/dogma/attributes' )
1254
- || key . startsWith ( 'osmium' )
1255
- ) {
1255
+ if ( custom_cache ) {
1256
1256
let tx = db . transaction ( 'cache' , 'readwrite' ) ;
1257
1257
let store = tx . objectStore ( 'cache' ) ;
1258
1258
store . put ( data ) ;
You can’t perform that action at this time.
0 commit comments