add ngx variable stack for mocking ngx
update cache spec to use mock_request