change name memstore-cluster => cluster-store

This commit is contained in:
AJ ONeal 2015-07-26 01:41:16 -06:00
parent bbc4939a45
commit 9113b7d46e
2 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
memstore Cluster Cluster Store
================ =============
A very simple in-memory object store for use with node cluster A very simple in-memory object store for use with node cluster
(or even completely and unrelated node processes). (or even completely and unrelated node processes).
@ -29,7 +29,7 @@ you'll probably prefer to use this pattern:
```js ```js
var cluster = require('cluster'); var cluster = require('cluster');
var store = require('memstore-cluster'); var cstore = require('cluster-store');
var numCores = require('os').cpus().length; var numCores = require('os').cpus().length;
var opts = { var opts = {
@ -46,7 +46,7 @@ var opts = {
, standalone: (1 === numCores) // overrides serve and connect , standalone: (1 === numCores) // overrides serve and connect
}; };
memstore.create(opts).then(function (store) { cstore.create(opts).then(function (store) {
// same api as new sqlite3.Database(options.filename) // same api as new sqlite3.Database(options.filename)
store.get(id, function (err, data) { store.get(id, function (err, data) {
@ -97,13 +97,13 @@ See <https://github.com/expressjs/session#session-store-implementation>@4.x for
Standalone / Master Mode is in-process Standalone / Master Mode is in-process
======================== ========================
The `master` in the cluster (meaning `opts.serve = true`) will directly hold the `express-session/session/memory` The `master` in the cluster (meaning `opts.serve = true`) will directly hold the specified store
memory store. (a simple memory store by default, or `express-session/session/memory` in the example above)
Likewise, when only one process is being used (`opts.standalone = true`) the listener is Likewise, when only one process is being used (`opts.standalone = true`) the listener is
not started and API is completely in-process. not started and API is completely in-process.
If you take a look at `wrapper.js` you'll see that it's a rather simple memory store instance. If you take a look at `memstore.js` you'll see that it's a rather simple memory store instance.
Security Warning Security Warning
================ ================

View File

@ -1,5 +1,5 @@
{ {
"name": "memstore-cluster", "name": "cluster-store",
"version": "1.0.0", "version": "1.0.0",
"description": "A wrapper to enable the use of a in-process store with node cluster via a socket server (i.e. for Raspberry Pi 2).", "description": "A wrapper to enable the use of a in-process store with node cluster via a socket server (i.e. for Raspberry Pi 2).",
"main": "index.js", "main": "index.js",
@ -9,7 +9,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/coolaj86/memstore-cluster.git" "url": "git+https://github.com/coolaj86/cluster-store.git"
}, },
"keywords": [ "keywords": [
"store", "store",
@ -23,9 +23,9 @@
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.com/)", "author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.com/)",
"license": "Apache-2.0", "license": "Apache-2.0",
"bugs": { "bugs": {
"url": "https://github.com/coolaj86/memstore-cluster/issues" "url": "https://github.com/coolaj86/cluster-store/issues"
}, },
"homepage": "https://github.com/coolaj86/memstore-cluster#readme", "homepage": "https://github.com/coolaj86/cluster-store#readme",
"dependencies": { "dependencies": {
"ws": "^0.7.2" "ws": "^0.7.2"
} }