我运行了一个node.js进程,模块缓存在哪里? 如何获得此进程的模块缓存?
答案 0 :(得分:0)
if you have to store values in cache then node-redis module is best for you.
Redis is a fast and efficient in-memory key-value store. It is also known as a data structure server, as the keys can contain strings, lists, sets, hashes and other data structures.
var redis = require('redis');
var client = redis.createClient();
client.on('connect', function() {
console.log('connected');
});
client.set('framework', 'AngularJS', function(err, reply) {
console.log(reply);
});
client.get('framework', function(err, reply) {
console.log(reply);
});