Fix #18: don't retrieve query results when already have them & ttl = -1.

This commit is contained in:
Arik Fraimovich 2013-10-30 16:43:18 +02:00
parent 04e1534001
commit db9aa4bc38

View File

@ -248,9 +248,9 @@
}
var queryResult = null;
if (this.latest_query_data && ttl > 0) {
if (this.latest_query_data && ttl != 0) {
queryResult = new QueryResult({'query_result': this.latest_query_data});
} else if (this.latest_query_data_id && ttl > 0) {
} else if (this.latest_query_data_id && ttl != 0) {
queryResult = QueryResult.getById(this.latest_query_data_id);
} else {
queryResult = QueryResult.get(this.query, ttl);