mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 23:36:27 +00:00
Optimized user infos cache transmission
This commit is contained in:
parent
174ad6779a
commit
38dadde06b
@ -97,9 +97,9 @@ ComunicWeb.components.searchForm = {
|
|||||||
var userID = response[i];
|
var userID = response[i];
|
||||||
|
|
||||||
//We show user only if we have informations about him
|
//We show user only if we have informations about him
|
||||||
if(usersInfos[userID])
|
if(usersInfos["user-"+userID])
|
||||||
//Display user informations
|
//Display user informations
|
||||||
ComunicWeb.components.searchForm.displayUser(usersInfos[userID], menuList);
|
ComunicWeb.components.searchForm.displayUser(usersInfos["user-"+userID], menuList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ ComunicWeb.user.userInfos = {
|
|||||||
|
|
||||||
//Return a simple array
|
//Return a simple array
|
||||||
else
|
else
|
||||||
afterGetUserInfos(result[userID]);
|
afterGetUserInfos(result["user-"+userID]);
|
||||||
}, forceRequest);
|
}, forceRequest);
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -61,7 +61,7 @@ ComunicWeb.user.userInfos = {
|
|||||||
//Check the local cache
|
//Check the local cache
|
||||||
if(this.usersInfos["user-"+processUserID] && !forceRequest){
|
if(this.usersInfos["user-"+processUserID] && !forceRequest){
|
||||||
//Add user information to cached informations
|
//Add user information to cached informations
|
||||||
cachedInformations[processUserID] = this.usersInfos["user-"+processUserID];
|
cachedInformations["user-"+processUserID] = this.usersInfos["user-"+processUserID];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//Else we'll have to get data
|
//Else we'll have to get data
|
||||||
@ -107,7 +107,7 @@ ComunicWeb.user.userInfos = {
|
|||||||
//Store
|
//Store
|
||||||
ComunicWeb.user.userInfos.usersInfos["user-"+userID] = result[i];
|
ComunicWeb.user.userInfos.usersInfos["user-"+userID] = result[i];
|
||||||
|
|
||||||
returnInformations[userID] = result[i];
|
returnInformations["user-"+userID] = result[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user