added: get_host_from_cache() function to environment
changed: Moved get host cache logic from traffic accounting plugin to environment to avoid (future) code duplication