Check if cache configuration allows to cache the response

resolve #263