Optimized user infos cache transmission

This commit is contained in:
Pierre 2017-05-31 17:14:29 +02:00
parent 174ad6779a
commit 38dadde06b
2 changed files with 5 additions and 5 deletions

View File

@ -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);
} }

View File

@ -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];
} }