From 587f66c23d795321b5c8ecc65fd15cfa43bcf6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Mart=C3=ADnez?= Date: Wed, 17 Feb 2016 15:36:26 +0100 Subject: [PATCH] Sort cache channels and keys alphabetically --- lib/cartodb/cache/model/database_tables_entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/cache/model/database_tables_entry.js b/lib/cartodb/cache/model/database_tables_entry.js index 60629714..a64c8dae 100644 --- a/lib/cartodb/cache/model/database_tables_entry.js +++ b/lib/cartodb/cache/model/database_tables_entry.js @@ -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; };