Adding Caching to Custom handler

Hi Guys,

I wanted to know, if I can use nginx caching techniques in my handler.
There is no backend server and I cannot use proxy_pass.

I wanted to store contents from some other library. For example:

location /cdn {
myhandler;
proxy_cache my-cache;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
}

I think this will not work.

Can anyone help me how I can achieve caching in my handler.

Thanks,
Raul

On Apr 26, 2012, at 4:10 AM, Sammy R. wrote:

Can anyone help me how I can achieve caching in my handler.

You can add the http file cache stuff to your handler. It’s not too
hard, but not documented very well. If you can write an nginx handler,
then you already have the skills needed.

–Brian