finally untangle metadata and index caches
This commit is contained in:
@@ -139,16 +139,10 @@ Data.setMetadata = function (Env, safeKey, data, cb, Server) {
|
||||
next();
|
||||
|
||||
const metadata_cache = Env.metadata_cache;
|
||||
const channel_cache = Env.channel_cache;
|
||||
|
||||
// update the cached metadata
|
||||
metadata_cache[channel] = metadata;
|
||||
|
||||
// as well as the metadata that's attached to the index...
|
||||
// XXX determine if we actually need this...
|
||||
var index = Util.find(channel_cache, [channel, 'index']);
|
||||
if (index && typeof(index) === 'object') { index.metadata = metadata; }
|
||||
|
||||
// it's easy to check if the channel is restricted
|
||||
const isRestricted = metadata.restricted;
|
||||
// and these values will be used in any case
|
||||
|
||||
Reference in New Issue
Block a user