Added util function to check a user id or ip
Refactor: moved function to cache/helpers