private void invalidateApiKeyCacheEntry(final HashedApiKey apiKey) {
        if (apiKey != null) {
            final String apiKeyPrefix = apiKey.getApiKeyPrefix();
            // It's possible there are >1 entries with the same prefix, but that is lottery odds
            // so just invalidate any that match, and they can be re-loaded if needed.
            // We can't invalidate by key as we don't store the api key str.
            apiKeyToAuthenticatedUserCache.invalidateEntries((apiKeyStr, optUser) ->
                    apiKeyStr.startsWith(apiKeyPrefix));
        }
    }
Fetch the verified {@link UserIdentity} for the passed API key.
If the hash of the API key matches one in the database and that key is enabled
and not expired then the {@link UserIdentity} will be returned, else an empty {@link Optional}
is returned.
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/apikey/ApiKeyService.java