CartoDB-SQL-API/app/utils/cache_key_generator.js

10 lines
284 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function generateCacheKey(database, query_info, is_authenticated){
if ( ! query_info || ( is_authenticated && query_info.may_write ) ) {
return "NONE";
} else {
return database + ":" + query_info.affected_tables.join(',');
}
};