Skip to content

Commit

Permalink
new cached flag usage
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 25, 2018
1 parent 9094235 commit 86ccac8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/ripe-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/js/ripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,8 @@ ripe.Ripe.prototype._cacheURL = function(url, options, callback) {

// determines if the current request should be cached, obeys
// some of the basic rules for that behaviour
var cached = !options.force && ["GET"].indexOf(options.method || "GET") !== -1;
var cached = typeof options.cached === "undefined" ? true : options.cached;
cached = cached && !options.force && ["GET"].indexOf(options.method || "GET") !== -1;

// initializes the cache object in the current instance
// in case it does not exists already
Expand Down
3 changes: 2 additions & 1 deletion src/python/ripe_demo/static/js/ripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,8 @@ ripe.Ripe.prototype._cacheURL = function(url, options, callback) {

// determines if the current request should be cached, obeys
// some of the basic rules for that behaviour
var cached = !options.force && ["GET"].indexOf(options.method || "GET") !== -1;
var cached = typeof options.cached === "undefined" ? true : options.cached;
cached = cached && !options.force && ["GET"].indexOf(options.method || "GET") !== -1;

// initializes the cache object in the current instance
// in case it does not exists already
Expand Down

0 comments on commit 86ccac8

Please sign in to comment.