fixed redis cache leak issue

This commit is contained in:
strawmanbobi
2025-06-03 13:05:57 +08:00
parent f84bd13f85
commit f00d088078
6 changed files with 7 additions and 59 deletions

View File

@@ -29,7 +29,7 @@ var Cache = function(_host, _port, _user, _password) {
Cache.prototype = Object.create(BaseCache.prototype);
Cache.prototype.set = function(key, value, ttl, callback) {
this.redisClient.set(key, value, function(err) {
this.redisClient.set(key, value, 'EX', ttl, function(err) {
if(err) {
logger.error("Redis set value failed with key " + key);
callback(errorCode.FAILED);