# Nginx Regexp Plugins

**URL:** <https://www.ruby-forum.com/t/nginx-regexp-plugins/213936>\
**Category:** NGINX\
**Created:** [November 16, 2011, 5:34pm UTC](https://www.ruby-forum.com/t/nginx-regexp-plugins/213936 "2011-11-16T17:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [November 16, 2011, 5:34pm UTC](https://www.ruby-forum.com/t/nginx-regexp-plugins/213936/1 "2011-11-16T17:34:49Z")

</div>

This plugin in base on ngx\_cache\_purge-1.4

P.S: This plugin current will blocking web request, now is only for  
test. I cannot found a method to make nginx run a new thread.

Usage:  
location ~ ^/regex\_purge(/.\*) {  
proxy\_cache\_batchpurge cache\_zone $1$is\_args$args;  
}

download: [http://m-b.cc/share/ngx\_batch\_purge-0.1.tgz](http://m-b.cc/share/ngx_batch_purge-0.1.tgz)

–  
MagicBear

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 16, 2011, 6:33pm UTC](https://www.ruby-forum.com/t/nginx-regexp-plugins/213936/2 "2011-11-16T18:33:01Z")

</div>

Hey,

> P.S: This plugin current will blocking web request, now is only for test.

I know you’ve got good intentions, but this module will kill your box.

> I cannot found a method to make nginx run a new thread.

Just fork() the worker process.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 16, 2011, 7:47pm UTC](https://www.ruby-forum.com/t/nginx-regexp-plugins/213936/3 "2011-11-16T19:47:53Z")

</div>

I have tried for this, but when done the first time, it will have some  
error for next. I Have thinking for spawn a process at startup or  
using nginx cache manager process to do this.

Piotr S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 於 2011-11-17 1:32 寫道：
