GUAC-1126: Maintain session-local data through login/logout events broadcast from the authentication service.

This commit is contained in:
Michael Jumper committed 2015-04-09 13:01:37 -07:00
1 parent 311d56bae5
commit c69f7db522
6 files changed
+49 -22

No files matched your search

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