@azteam/redis-async 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/redis-async",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/RedisAsync.js CHANGED
@@ -87,21 +87,21 @@ class RedisAsync {
87
87
  return await ttlAsync(prefixKey);
88
88
  }
89
89
 
90
- async expire(key, time = 100000) {
90
+ async expire(key, time = 86400) {
91
91
  const prefixKey = this.parsePrefix(key);
92
92
 
93
93
  this.client.expire(prefixKey, time);
94
94
  }
95
95
 
96
- async set(key, data, time = 100000) {
96
+ async set(key, data, timeSecond = 86400) {
97
97
  const prefixKey = this.parsePrefix(key);
98
98
 
99
99
  if (this.connected) {
100
100
  console.log(`Redis SET ${prefixKey}`);
101
- return await this.client.set(prefixKey, JSON.stringify(data), 'EX', time);
101
+ return await this.client.set(prefixKey, JSON.stringify(data), 'EX', timeSecond);
102
102
  } else {
103
103
  this.connect();
104
- return this.set(key, data, time);
104
+ return this.set(key, data, timeSecond);
105
105
  }
106
106
  }
107
107