express-batching
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -65,3 +65,4 @@ 'use strict'; | ||
delete cache[key]; | ||
}, 5 * 1000); // 30 seconds | ||
}, 5 * 1000); // 5 seconds | ||
var queue = queues[key]; | ||
@@ -72,2 +73,4 @@ queue.forEach(function (responseObj) { | ||
}); | ||
// clear queue | ||
delete queues[key]; | ||
} | ||
@@ -74,0 +77,0 @@ }; |
@@ -84,3 +84,4 @@ | ||
this.timeout(10000); | ||
var createReq = function createReq(num) { | ||
var createReq = function createReq() { | ||
// num param for logs | ||
// console.log(`Req #${num} created.`); | ||
@@ -87,0 +88,0 @@ request.get('http://localhost:3000/baz').end(function (err, res) { |
{ | ||
"name": "express-batching", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A small higher order component for in-process batching and caching of API requests", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -1,2 +0,2 @@ | ||
# express-batching [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status](https://coveralls.io/repos/github/blugavere/express-batching/badge.svg?branch=master)](https://coveralls.io/github/blugavere/express-batching?branch=master)[![NPM Downloads](https://img.shields.io/npm/dm/express-batching.svg?style=flat)](https://www.npmjs.com/package/express-batching) | ||
# express-batching [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status](https://coveralls.io/repos/github/blugavere/express-batching/badge.svg?branch=master)](https://coveralls.io/github/blugavere/express-batching?branch=master)[![NPM Downloads](https://img.shields.io/npm/dm/express-batching.svg?style=flat)](https://www.npmjs.com/package/express-batching)[![Patreon](https://img.shields.io/badge/patreon-support%20the%20author-blue.svg)](https://www.patreon.com/blugavere) | ||
@@ -33,2 +33,13 @@ > A small higher order component for in-process batching and caching of API requests | ||
### TODOs | ||
In order of importance | ||
- get a cool logo | ||
- optimize perf | ||
- config param | ||
- cache timeout | ||
- max queue size | ||
- setter injection for alternative cache (redis) | ||
- moar tests | ||
## Testing | ||
@@ -35,0 +46,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
10099
181
63