Skip to content

Commit 7ac1aa2

Browse files
committed
0.9.1
1 parent 63b7263 commit 7ac1aa2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

eve-ui.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// ` used whenever interpolation is required
66
'use strict';
77
// config stuff ( can be overridden in a script block or js file of your choice )
8-
var eveui_user_agent = eveui_user_agent || 'For source website, see referrer. For library, see https://github.com/quiescens/eve-ui/ r:' + `0.9.0`;
8+
var eveui_user_agent = eveui_user_agent || 'For source website, see referrer. For library, see https://github.com/quiescens/eve-ui/ r:' + `0.9.1`;
99
var eveui_preload_initial = eveui_preload_initial || 50;
1010
var eveui_preload_interval = eveui_preload_interval || 10;
1111
var eveui_mode = eveui_mode || 'multi_window'; // expand_all, expand, multi_window, modal
@@ -791,6 +791,9 @@ var eveui;
791791
function cache_request(key) {
792792
let url;
793793
let jsonp = false;
794+
let custom_cache = key.startsWith('/v3/universe/types')
795+
|| key.startsWith('/v1/dogma/attributes')
796+
|| key.startsWith('osmium');
794797
if (key.startsWith('osmium:')) {
795798
jsonp = true;
796799
let dna = key.split(':', 2)[1];
@@ -816,16 +819,14 @@ var eveui;
816819
requests_pending++;
817820
return eveui.cache[key] = $.ajax(url, {
818821
dataType: dataType,
819-
cache: true,
822+
cache: !custom_cache,
820823
}).done(function (data) {
821824
data.path = key;
822825
// store data in session cache
823826
eveui.cache[key] = data;
824827
if (db) {
825828
// only manually cache keypaths where the data doesn't change until the server version changes
826-
if (key.startsWith('/v3/universe/types')
827-
|| key.startsWith('/v1/dogma/attributes')
828-
|| key.startsWith('osmium')) {
829+
if (custom_cache) {
829830
let tx = db.transaction('cache', 'readwrite');
830831
let store = tx.objectStore('cache');
831832
store.put(data);

0 commit comments

Comments
 (0)