10 lines
284 B
JavaScript
10 lines
284 B
JavaScript
|
'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(',');
|
||
|
}
|
||
|
};
|