Commit 0dbff00e authored by tywldx's avatar tywldx

f

parent 818016cf
...@@ -14,7 +14,7 @@ module.exports = { ...@@ -14,7 +14,7 @@ module.exports = {
set: function (ctx, key, value, time_out = 30000) { set: function (ctx, key, value, time_out = 30000) {
var val = JSON.stringify({ type: typeof value, val: value }); var val = JSON.stringify({ type: typeof value, val: value });
this.client.set(`${ctx.request.ip}${key}`, val); this.client.set(`${ctx.request.ip}${key}`, val);
this.client.expire(`${ctx.request.ip}${key}`, time_out);//设定失效时间,没有生效 // this.client.expire(`${ctx.request.ip}${key}`, 360000);//设定失效时间,没有生效
}, },
del: async function (ctx, key) { del: async function (ctx, key) {
return this.client.del(`${ctx.request.ip}${key}`) return this.client.del(`${ctx.request.ip}${key}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment