added caching for complex lookups

This commit is contained in:
2020-12-29 13:15:27 -05:00
parent bce23ab9fe
commit 1ff7d3cb4f
5 changed files with 230 additions and 27 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ table.listDetail = async function(){
return out
};
table.add = async function(data){
table.add = async function(data, noMemberAdd){
// Add a entry to this redis table.
try{
@@ -102,7 +102,7 @@ table.add = async function(data){
}
// Add the key to the members for this redis table
await client.SADD(this._name, data[this._key]);
if(!noMemberAdd) await client.SADD(this._name, data[this._key]);
// Add the values for this entry.
for(let key of Object.keys(data)){