Skip to content

Commit

Permalink
doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowwzw committed Feb 3, 2017
1 parent 0289a9d commit 8d73cc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 46 deletions.
45 changes: 1 addition & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **lite-node-cache**
Universal module for caching databases query, http requests and more. Using ES6. Detailed documentation. Good test coverage. 3.5 times faster than node-cache module.
Universal module for caching databases query, http requests and more. Using ES6. Detailed documentation. Good test coverage.
This module for [node](http://nodejs.org).

[![Latest Stable Version](https://img.shields.io/npm/v/lite-node-cache.svg)](https://www.npmjs.com/package/lite-node-cache)
Expand Down Expand Up @@ -201,49 +201,6 @@ $ mocha test.js
```
----------

## **Benchmark**

### *set and get 1000000 elements (Node v7.4.0):*

```
lite-node-cache execution time: 0.88 sec.
node-cache execution time: 3.431 sec.
```

### *source code of benchmark:*
```js
const timeStart = Date.now();
const NodeCache = require( "node-cache" );
const myCache = new NodeCache();

for(let i = 0; i < 1000000; i++){
const random = Math.random();
myCache.set(random, random);
if(!myCache.get(random)) throw Error("get error");
}

console.log("elements = ", myCache.keys().length);

console.log("node-cache execution time = ", ((Date.now()-timeStart) / 1000));


const timeStart2 = Date.now();
const Cache = require( "lite-node-cache" );
const myCache2 = new Cache();

for(let i = 0; i < 1000000; i++){
const random = Math.random();
myCache2.set(random, random);
if(!myCache2.get(random)) throw Error("get error");
}

console.log("elements = ", myCache2.keys().length);

console.log("lite-node-cache execution time = ", ((Date.now()-timeStart2) / 1000));
```
----------

## **License**

The MIT License (MIT)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lite-node-cache",
"version": "0.6.9",
"description": "Universal module for caching databases query, http requests and more. Using ES6. Detailed documentation. Good test coverage. 3.5 times faster than node-cache module.",
"version": "0.6.10",
"description": "Universal module for caching databases query, http requests and more. Using ES6. Detailed documentation. Good test coverage.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit 8d73cc9

Please sign in to comment.