<commit_before>
# request-aside

__NOTE: ONLY RECENLTY REVIVED, NOT READY FOR USE YET__

A Node.js module that makes request calls, caches them, and queues them for renewal.

_Note: This module extends [`request`](https://www.npmjs.com/package/request)._

## Install

Install via NPM.

```bash
[~] npm install request-aside
```

## Usage

```javascript
// import
var request = require('request-aside');

// request
request(url, cb);

// request and cache
request({
	method: 'GET',
	url: url,
	cache: 60 * 60 * 1000 // cache for 1 hour
}, cb);

// request and renew (overrides `cache` param if present)
request({
	method: 'GET',
	url: url,
	renew: 60 * 60 * 1000 // renew every 1 hour
}, cb);

// request and cache (or renew) using Redis instead of memory
var redisClient = redis.createClient(redisPort, redisHostname);
redisClient.auth(redisAuth);
request({
	method: 'GET',
	url: url,
	cache: 60 * 60 * 1000, // cache for 1 hour
	redis: redisClient
});
```

## License

[MIT](https://github.com/tobius/request-aside/blob/master/LICENSE)
<commit_msg>update example format<commit_after>
# request-aside

__NOTE: ONLY RECENLTY REVIVED, NOT READY FOR USE YET__

A Node.js module that makes request calls, caches them, and queues them for renewal.

_Note: This module extends [`request`](https://www.npmjs.com/package/request)._

## Install

Install via NPM.

```bash
[~] npm install request-aside
```

## Usage

__Request (without cache)__

```javascript
var request = require('request-aside');
request(url, cb);
```

__Request and cache__

```javascript
var request = require('request-aside');
request({
	method: 'GET',
	url: url,
	cache: 60 * 60 * 1000 // cache for 1 hour
}, cb);
```

__Request and renew (overrides `cache`)__

```javascript
var request = require('request-aside');
request({
	method: 'GET',
	url: url,
	renew: 60 * 60 * 1000 // renew every 1 hour
}, cb);
```

__Request and cache (or renew) in Redis instead of memory__

```javascript
var request = require('request-aside');
var client = redis.createClient();
request({
	method: 'GET',
	url: url,
	cache: 60 * 60 * 1000, // cache for 1 hour
	redis: client
});
```

## License

[MIT](https://github.com/tobius/request-aside/blob/master/LICENSE)

{'fraction_non_alphanumeric': 0.1493212669683258, 'fraction_numerical': 0.024434389140271493, 'mean_word_length': 4.226950354609929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7070607', 'n_tokens_mistral': 833, 'n_tokens_neox': 735, 'n_words': 246}