oh, and is $url not supposed to be an absolute url only? i think the cache invalidator is supposed to add the default host to paths if needed. if i call `purge('http://host/path')` the above code will fail. we would need to parse the url in that case. 

or is the idea that nginx handles http://1.2.3.4/purge/http://host/path ? (that is a real question, i don't know how nginx cache invalidation works.)