Sort cache channels and keys alphabetically

This commit is contained in:
Alejandro Martínez 2016-02-17 15:36:26 +01:00
parent 19596245b8
commit 587f66c23d

View File

@ -11,13 +11,13 @@ module.exports = DatabaseTables;
DatabaseTables.prototype.key = function() {
return this.tables.map(function(table) {
return this.namespace + ':' + shortHashKey(table.dbname + ':' + table.table_name + '.' + table.schema_name);
}.bind(this));
}.bind(this)).sort();
};
DatabaseTables.prototype.getCacheChannel = function() {
var key = this.tables.map(function(table) {
return table.dbname + ':' + table.schema_name + "." + table.table_name;
}).join(";;");
}).sort().join(";;");
return key;
};