Added cache to security domain. Integration tests should not have any cache. fixes #145