Skip to content

Commit 3cc6d38

Browse files
committed
options changes
- Changed debug to setup for each ajax call, sometimes you want to debug a specific call only. - Fix a bug for creating the key and minutes_to_expiration on skip_cache true.
1 parent e145e07 commit 3cc6d38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jquery.ajax-session-storage-cache.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
cache_value;
2222

2323
this.ajax_options = $.extend({}, options.ajax_options, { context: this, success: [ options.ajax_options.success, this.cacheResponse ] });
24-
this.debug = !!global_options.debug;
25-
24+
this.debug = options.debug !! global_options.debug;
25+
this.key = namespace + "-" + options.key;
26+
this.minutes_to_expiration = options.minutes_to_expiration;
27+
2628
if (skip_cache) {
2729
this.performAjax();
2830
} else {
29-
this.key = namespace + "-" + options.key;
30-
this.minutes_to_expiration = options.minutes_to_expiration;
3131

3232
cache_value = this.getSessionStorageCache(this.key);
3333

@@ -106,4 +106,4 @@
106106
minutes_to_expiration: 5
107107
}
108108

109-
})( jQuery );
109+
})( jQuery );

0 commit comments

Comments
 (0)