DefaultAuthzResultCache { public void invalidate(final User user) { if (user == null || user.getIdentifier() == null || user.getIdentifier().isEmpty()) { return; } for (Map<String, AuthorizationResult> entry : internal.values()) { entry.remove(user.getIdentifier()); } }  AuthorizationResult get(final User user,
                                   final Permission permission); void put(final User user,
                    final Permission permission,
                    final AuthorizationResult authzResult); int size(User user); void clear(); void invalidate(final User user);  }
@Test public void testInvalidate() { final User user = createUserMock("admin"); final Permission viewAll = new DotNamedPermission("resource.read", true); DefaultAuthzResultCache cache = new DefaultAuthzResultCache(); cache.put(user, viewAll, AuthorizationResult.ACCESS_GRANTED); assertEquals(AuthorizationResult.ACCESS_GRANTED, cache.get(user, viewAll)); cache.invalidate(user); assertNull(cache.get(user, viewAll)); }