added cache availability test and ALLOWED_HOSTS default setting