Shared Memory Cache Store using /dev/shm/ aka. tmpfs
npm install mem-shmmem-shm
==========
Node.JS module which allows you to store, key => value to /dev/shm/
var memShm = require('mem-shm');
var mem = new memShm("myDirectory","myFile");
####Entire Cache
var tmp = mem.get();
console.log(tmp);
####All Keys for memoryId
var tmp = mem.get(memoryId);
console.log(tmp);
####Specific Key for memoryId
var tmp = mem.get(memoryId,key);
console.log(tmp);
#####Note: returned tmp can be an Object, JSON.parse will be applied
var memoryId = "test";
var key = "test";
var val = 1;
mem.set(memoryId,key,val);
#####Note: val can be an Object, JSON.stringify will be applied
####memoryId and All Keys for memoryId
mem.del(memoryId);
####Specific Key for memoryId
mem.del(memoryId,key);
####Empties entire mem cache
mem.clear();
####Entire Cache Length
var leng = mem.count();
console.log(leng);
####Length of memoryId
var leng = mem.count(memoryId);
console.log(leng);
####Length of Specific Key for memoryId
var leng = mem.count(memoryId,key);
console.log(leng);
var memShm = require('mem-shm');
var mem = new memShm(directory,file);
Returns /dev/shm/directory/file or null if it does not exist
Returns the [memoryId] from /dev/shm/directory/file or null if it does not exist
Returns the [memoryId][key] from /dev/shm/directory/file or null if it does not exist
Saves val to [memoryId][key] in /dev/shm/directory/file
Deletes the [memoryId] from /dev/shm/directory/file if it exists
Deletes the [memoryId][key] from /dev/shm/directory/file if it exists
Empties entire mem cache in /dev/shm/directory/file
Returns length of entire mem cache in /dev/shm/directory/file
Returns length of [memoryId] from /dev/shm/directory/file or 0 if it does not exist
Returns length of [memoryId][key] from /dev/shm/directory/file or 0 if it does not exist