public void update(Observable arg0, Object arg) {
		// arg is Event
		if (!(arg instanceof Event))
			return;
		Event event = (Event) arg;
		// check the event function against the functions we have notifications watching for
		String function = event.getEvent();
		//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
		if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
				|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
			//we need the userId
			Reference ref = entityManager.newReference(event.getResource());
			// look for group reference. Need to replace it with parent site reference
			String refId = ref.getId();
			try {
				String eid = userDirectoryService.getUserEid(refId);
				log.debug("removing " + eid + " from cache");
				authenticationCache.removeAuthentification(eid);
				userCache.remove(UserDirectoryService.IDCACHE + eid);
				userCache.remove(UserDirectoryService.EIDCACHE + refId);
			} catch (UserNotDefinedException e) {
				//not sure how we'd end up here
				log.warn(e.getMessage(), e);
			}
		} 
	}
public void update(Observable arg0, Object arg) {
	
		if (!(arg instanceof Event))
			return;
		Event event = (Event) arg;
	
		String function = event.getEvent();
	
		if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
				|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
		
			Reference ref = entityManager.newReference(event.getResource());
		
			String refId = ref.getId();
			try {
				String eid = userDirectoryService.getUserEid(refId);
				log.debug("removing " + eid + " from cache");
				authenticationCache.removeAuthentification(eid);
				userCache.remove(UserDirectoryService.IDCACHE + eid);
				userCache.remove(UserDirectoryService.EIDCACHE + refId);
			} catch (UserNotDefinedException e) {
			
				log.warn(e.getMessage(), e);
			}
		} 
	}
public void update(observable arg0, object arg) { if (!(arg instanceof event)) return; event event = (event) arg; string function = event.getevent(); if (userdirectoryservice.secure_add_user.equals(function) || userdirectoryservice.secure_update_user_own_password.equals(function) || userdirectoryservice.secure_update_user_any.equals(function) || userdirectoryservice.secure_update_user_own.equals(function)) { reference ref = entitymanager.newreference(event.getresource()); string refid = ref.getid(); try { string eid = userdirectoryservice.getusereid(refid); log.debug("removing " + eid + " from cache"); authenticationcache.removeauthentification(eid); usercache.remove(userdirectoryservice.idcache + eid); usercache.remove(userdirectoryservice.eidcache + refid); } catch (usernotdefinedexception e) { log.warn(e.getmessage(), e); } } }