0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-12-25 01:53:48 +01:00

api cache prevention

This commit is contained in:
peteruithoven 2014-05-08 22:35:46 +02:00
parent 269f5412ce
commit 2c9354dce9
2 changed files with 8 additions and 2 deletions

View File

@ -23,7 +23,7 @@ function ConnectAPI() {
var _timeoutTime = 3000;
var _refreshDelay;
var _refreshInterval = 3000;
var _refreshInterval = 5000;
var _running;
var _listChanged = false;
@ -45,6 +45,7 @@ function ConnectAPI() {
type: "GET",
dataType: 'json',
timeout: _timeoutTime,
cache: false,
success: function(response){
//console.log("ConnectAPI:list response: ",response);
if(response.status == "error" || response.status == "fail") {
@ -126,7 +127,11 @@ function ConnectAPI() {
// check if all found boxes are alive
jQuery.each(foundBoxes, function (index,foundBox) {
if(foundBox === _apBox) { // don't recheck apBox
addBox(foundBox);
} else {
checkBox(foundBox);
}
});
if(foundBoxes.length == 0 && _self.listUpdated) {

View File

@ -202,6 +202,7 @@ function NetworkAPI() {
type: "GET",
dataType: 'json',
timeout: timeoutTime,
cache: false,
success: function(response){
//console.log("NetworkAPI:alive response: ",response);
if(response.status == "error" || response.status == "fail") {