memoize-cache
Advanced tools
Comparing version 1.0.0 to 1.0.1
10
cache.js
@@ -14,3 +14,3 @@ var md5omatic = require('md5-o-matic'); | ||
this._getCacheKey = key || function () { return '_default'; }; | ||
this._taskToComplete = []; | ||
this._tasksToComplete = []; | ||
} | ||
@@ -29,3 +29,3 @@ | ||
var task = this.cacheManager.setAsync(k, output); | ||
this._taskToComplete.push(task); | ||
this._tasksToComplete.push(task); | ||
}; | ||
@@ -37,5 +37,7 @@ | ||
Promise.all(this._taskToComplete) | ||
var tasksToComplete = this._tasksToComplete; | ||
this._tasksToComplete = []; | ||
Promise.all(tasksToComplete) | ||
.then(function () { | ||
that._taskToComplete = []; | ||
return that.cacheManager.getAsync(key); | ||
@@ -42,0 +44,0 @@ }) |
{ | ||
"name": "memoize-cache", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A cache support for memoized functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
memoize-cache | ||
============= | ||
[![Build Status](https://travis-ci.org/sithmel/memoize-cache.svg?branch=master)](https://travis-ci.org/sithmel/memoize-cache) | ||
A configurable cache support for functions (https://www.npmjs.com/package/async-deco). It contains 2 different implementations. | ||
@@ -4,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32190
832
97