In Angularjs, I keep lot of data in my services so that the server calls can be reduced and the data can be picked from local variables. This leads to data being persisted in the application till user refresh screen or close the tab. This is hazard to both security and performance as lot of data is kept in browser memory.
I want to clean up all the services on certain event (like logout) so that the cached data is cleaned up from the browser memory.
Note: I do not want to refresh the screen (window.location.reload) and I have lot of services in my application already. So need some solution with minimum effort.