feat: #8824, cache refactor (#8851)

* feat: #8824, cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
This commit is contained in:
Barış Soner Uşaklı
2020-11-06 23:13:12 -05:00
committed by GitHub
parent bcbc085497
commit f1f9b225b0
23 changed files with 226 additions and 199 deletions

View File

@@ -41,6 +41,9 @@ helpers.isUserAllowedTo = async function (privilege, uid, cid) {
};
async function isUserAllowedToCids(privilege, uid, cids) {
if (!privilege) {
return cids.map(() => false);
}
if (parseInt(uid, 10) <= 0) {
return await isSystemGroupAllowedToCids(privilege, uid, cids);
}