The commercial version of Nginx comes with that functionality already; that’s one of the few key differences between the two versions (and, unfortunately, ngx_cache_purge cannot be loaded dynamically AFAICT).