Query: cache QueryResult so each call gets the same one.

This commit is contained in:
Arik Fraimovich 2014-05-05 18:34:54 +03:00
parent f95a09a015
commit 638fb123ec

View File

@ -357,7 +357,10 @@
var queryResult = null;
if (this.latest_query_data && ttl != 0) {
queryResult = new QueryResult({'query_result': this.latest_query_data});
if (!this.queryResult) {
this.queryResult = new QueryResult({'query_result': this.latest_query_data});
}
queryResult = this.queryResult;
} else if (this.latest_query_data_id && ttl != 0) {
queryResult = QueryResult.getById(this.latest_query_data_id);
} else if (this.data_source_id) {