|
|
|
@ -135,7 +135,7 @@ export default class RedisCacheMgr extends CacheMgr {
|
|
|
|
|
// e.g. arr = ["nc:<orgs>:<scope>:<model_id_1>", "nc:<orgs>:<scope>:<model_id_2>"]
|
|
|
|
|
const arr = (await this.get(key, CacheGetType.TYPE_ARRAY)) || []; |
|
|
|
|
log(`RedisCacheMgr::getList: getting list with key ${key}`); |
|
|
|
|
const isNoneList = arr.length && arr[0] === 'NONE'; |
|
|
|
|
const isNoneList = arr.length && arr.includes('NONE'); |
|
|
|
|
|
|
|
|
|
if (isNoneList) { |
|
|
|
|
return Promise.resolve({ |
|
|
|
@ -248,7 +248,7 @@ export default class RedisCacheMgr extends CacheMgr {
|
|
|
|
|
: `${this.prefix}:${scope}:${subListKeys.join(':')}:list`; |
|
|
|
|
log(`RedisCacheMgr::appendToList: append key ${key} to ${listKey}`); |
|
|
|
|
let list = (await this.get(listKey, CacheGetType.TYPE_ARRAY)) || []; |
|
|
|
|
if (list.length && list[0] === 'NONE') { |
|
|
|
|
if (list.length && list.includes('NONE')) { |
|
|
|
|
list = []; |
|
|
|
|
await this.del(listKey); |
|
|
|
|
} |
|
|
|
|