mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 14:41:21 +00:00
GUAC-1126: Maintain session-local data through login/logout events broadcast from the authentication service.
This commit is contained in:
@@ -28,7 +28,7 @@ angular.module('rest').factory('cacheService', ['$injector',
|
||||
|
||||
// Required services
|
||||
var $cacheFactory = $injector.get('$cacheFactory');
|
||||
|
||||
var $rootScope = $injector.get('$rootScope');
|
||||
|
||||
// Service containing all caches
|
||||
var service = {};
|
||||
@@ -63,7 +63,12 @@ angular.module('rest').factory('cacheService', ['$injector',
|
||||
service.connections.removeAll();
|
||||
service.users.removeAll();
|
||||
};
|
||||
|
||||
|
||||
// Clear caches on logout
|
||||
$rootScope.$on('guacLogout', function handleLogout() {
|
||||
service.clearCaches();
|
||||
});
|
||||
|
||||
return service;
|
||||
|
||||
}]);
|
||||
|
Reference in New Issue
Block a user