mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-12-25 18:13:48 +01:00
api cache prevention
This commit is contained in:
parent
269f5412ce
commit
2c9354dce9
@ -23,7 +23,7 @@ function ConnectAPI() {
|
|||||||
var _timeoutTime = 3000;
|
var _timeoutTime = 3000;
|
||||||
|
|
||||||
var _refreshDelay;
|
var _refreshDelay;
|
||||||
var _refreshInterval = 3000;
|
var _refreshInterval = 5000;
|
||||||
var _running;
|
var _running;
|
||||||
var _listChanged = false;
|
var _listChanged = false;
|
||||||
|
|
||||||
@ -45,6 +45,7 @@ function ConnectAPI() {
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: _timeoutTime,
|
timeout: _timeoutTime,
|
||||||
|
cache: false,
|
||||||
success: function(response){
|
success: function(response){
|
||||||
//console.log("ConnectAPI:list response: ",response);
|
//console.log("ConnectAPI:list response: ",response);
|
||||||
if(response.status == "error" || response.status == "fail") {
|
if(response.status == "error" || response.status == "fail") {
|
||||||
@ -126,7 +127,11 @@ function ConnectAPI() {
|
|||||||
|
|
||||||
// check if all found boxes are alive
|
// check if all found boxes are alive
|
||||||
jQuery.each(foundBoxes, function (index,foundBox) {
|
jQuery.each(foundBoxes, function (index,foundBox) {
|
||||||
|
if(foundBox === _apBox) { // don't recheck apBox
|
||||||
|
addBox(foundBox);
|
||||||
|
} else {
|
||||||
checkBox(foundBox);
|
checkBox(foundBox);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(foundBoxes.length == 0 && _self.listUpdated) {
|
if(foundBoxes.length == 0 && _self.listUpdated) {
|
||||||
|
@ -202,6 +202,7 @@ function NetworkAPI() {
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: timeoutTime,
|
timeout: timeoutTime,
|
||||||
|
cache: false,
|
||||||
success: function(response){
|
success: function(response){
|
||||||
//console.log("NetworkAPI:alive response: ",response);
|
//console.log("NetworkAPI:alive response: ",response);
|
||||||
if(response.status == "error" || response.status == "fail") {
|
if(response.status == "error" || response.status == "fail") {
|
||||||
|
Loading…
Reference in New Issue
Block a user