Skip to content

Commit

Permalink
Release 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Apr 25, 2016
1 parent 2724ee7 commit 330b585
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 7 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<a name="0.9.0"></a>
# [0.9.0](https://github.com/stephanebachelier/superapi-cache/compare/0.9.0...v0.9.0) (2016-04-25)


### Bug Fixes

* **cache:** return promise to not break promise chain ([2724ee7](https://github.com/stephanebachelier/superapi-cache/commit/2724ee7))

### Features

* **cache:** add flag to choose cache strategy if stale ([d228174](https://github.com/stephanebachelier/superapi-cache/commit/d228174))



<a name="0.8.0"></a>
# [0.8.0](https://github.com/stephanebachelier/superapi-cache/compare/0.8.0...v0.8.0) (2016-04-05)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superapi-cache",
"version": "0.9.0",
"version": "0.10.0",
"homepage": "https://github.com/stephanebachelier/superapi-cache",
"authors": [
"Stéphane Bachelier <stephane.bachelier@gmail.com>"
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function cache() {
config.maxAge = config.maxAge || 0;
config.readCache = config.readCache || _readCache2.default;
config.serialize = config.serialize || _serialize2.default;
config.clearOnStale = config.clearOnStale !== undefined ? config.clearOnStale : true;

config.exclude = config.exclude || {};
config.exclude.query = config.exclude.query || true;
Expand Down Expand Up @@ -73,7 +74,7 @@ function cache() {
return config.store.getItem(uuid).then(function (value) {
return config.readCache(req, config.log)(value).catch(function (err) {
// clean up cache if stale
err.reason === 'cache-stale' ? config.store.removeItem(uuid).then(f) : f();
return config.clearOnStale && err.reason === 'cache-stale' ? config.store.removeItem(uuid).then(f) : f();
});
});
};
Expand Down
3 changes: 2 additions & 1 deletion dist/umd/superapi-cache.js

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

2 changes: 1 addition & 1 deletion dist/umd/superapi-cache.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/superapi-cache.min.js

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

2 changes: 1 addition & 1 deletion dist/umd/superapi-cache.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superapi-cache",
"version": "0.9.0",
"version": "0.10.0",
"description": "Caching module for superapi",
"homepage": "https://github.com/stephanebachelier/superapi-cache",
"author": {
Expand Down

0 comments on commit 330b585

Please sign in to comment.