Reduse IOPS for /groups endpoint
/groups
endpoint in Entitlements is used to retrieve user groups.
Access to that endpoint is protected with a spring security authorization filter.
@PreAuthorize("@authorizationFilter.hasAnyPermission('" + AppProperties.OPS + "', '" + AppProperties.ADMIN + "', '" + AppProperties.USERS + "')")
The filter determines if the user can request his group, requesting user groups from cahce\db.
After the access evaluation, the process repeats but to prepare the response.
Access to the cache does not cost much but this is the most loaded endpoint, the current implementation causes X2 IOPS.