This is really interesting! But keep in mind, Varnish is blazing fast if you manage to fit everything in memory by using malloc. Also Varnish is more configurable than the Nginx cache. For example if you need to serve different content on the same url based on the Accept-Language header or a cookie, you can do this easily with Varnish by creating a lookup hash of the url + header value in VCL.
You can do the same on Nginx with https://github.com/openresty/lua-nginx-module (and much more)