Modify query_checkcacheaccess() so that it only contains a single return statement rather than three and so that the "check_acl" variable is no longer needed. Tweak and expand comments. Fix coding style issues.