superagent-cache
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "superagent-cache", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Superagent with flexible built-in caching.", | ||
@@ -5,0 +5,0 @@ "main": "superagentCache.js", |
@@ -469,2 +469,2 @@ # superagent-cache | ||
* `superagent-cache` is now more flexible, allowing usage of any cache that matches `cache-service`'s API. To make it lighter, then, the hard dependency on `cache-service` was replaced with the much lighter `cacheModule`. As a result, `superagent-cache` can no longer construct a `cache-service` instance for you. If you wish to use `cache-service`, you must instantiate it externally and hand it in as `cache`--the second param in the `require` command. | ||
`superagent-cache` is now more flexible, allowing usage of any cache that matches `cache-service`'s API. To make it lighter, then, the hard dependency on `cache-service` was replaced with the much lighter `cacheModule`. As a result, `superagent-cache` can no longer construct a `cache-service` instance for you. If you wish to use `cache-service`, you must instantiate it externally and hand it in as `cache`--the second param in the `require` command. |
@@ -126,6 +126,6 @@ var utils = require('./utils'); | ||
this.scRedirectsList = this.scRedirectsList.concat(this._redirectList); | ||
if(~supportedMethods.indexOf(this.method)){ | ||
if(~supportedMethods.indexOf(this.method.toUpperCase())){ | ||
var _this = this; | ||
var key = utils.keygen(superagent, this, curProps); | ||
if(~cacheableMethods.indexOf(this.method)){ | ||
if(~cacheableMethods.indexOf(this.method.toUpperCase())){ | ||
superagent.cache.get(key, function (err, response){ | ||
@@ -132,0 +132,0 @@ if(!err && response && !curProps.forceUpdate){ |
64384