Authored by 毕凯

调试 memcache

... ... @@ -16,7 +16,7 @@ module.exports = {
search: 'http://192.168.10.64:8080/yohosearch/'
},
useOneapm: false,
mamcached: {
memcache: {
server: ['192.168.102.168:12580'],
timeout: 5000
},
... ...
... ... @@ -11,7 +11,7 @@ const Memcached = require('memcached');
const _ = require('lodash');
const config = require('../config/common');
let cache = new Memcached(config.memcached.server, config.memcached);
let cache = new Memcached(config.memcache.server, config.memcache);
cache = Promise.promisifyAll(cache);
... ... @@ -49,9 +49,9 @@ exports.getMulti = (list) => {
exports.set = (key, value, lifetime) => {
lifetime = lifetime || 3600;
if (_.isObject(value)) {
value = JSON.stringify(value);
}
// if (_.isObject(value)) {
// value = JSON.stringify(value);
// }
if (_.isString(key)) {
return cache.setAsync(key, value, lifetime);
... ...