mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Added cache system
This commit is contained in:
@ -62,8 +62,9 @@ ComunicWeb.components.friends.bar = {
|
||||
this.refresh(listFriendsElem);
|
||||
|
||||
//Remove previously existing interval
|
||||
if(this.refreshInterval)
|
||||
if(this.refreshInterval){
|
||||
clearInterval(this.refreshInterval);
|
||||
}
|
||||
|
||||
//Make the friend bar automaticaly refreshed
|
||||
this.refreshInterval = setInterval(function(){
|
||||
|
@ -89,4 +89,21 @@ ComunicWeb.components.friends.list = {
|
||||
//Success
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Empty friends cache list
|
||||
*
|
||||
* @return {Boolean} True for a success
|
||||
*/
|
||||
emptyCache: function(){
|
||||
|
||||
//Empty cache
|
||||
this.__list = {};
|
||||
|
||||
//Success
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
//Register cache cleaner
|
||||
ComunicWeb.common.cacheManager.registerCacheCleaner("ComunicWeb.components.friends.list.emptyCache");
|
Reference in New Issue
Block a user