how to make nginx not cache php file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to make nginx not cache php file

vedranf
Hi all:
  When I use nginx-0.7.59 as a revers proxy and cache server,it also cache the php file,how to make it not cache php file ?
I thought the php file is not need to be cached.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,2437,2437#msg-2437


Reply | Threaded
Open this post in threaded view
|

Re: how to make nginx not cache php file

Jérôme Loyet
location ~ \.php$ {
  proxy_cache none;
}

it should do the trick

++ jerome
2009/5/28 perlish <[hidden email]>:
> Hi all:
>  When I use nginx-0.7.59 as a revers proxy and cache server,it also cache the php file,how to make it not cache php file ?
> I thought the php file is not need to be cached.
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,2437,2437#msg-2437
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: how to make nginx not cache php file

Igor Sysoev
On Thu, May 28, 2009 at 07:28:27AM +0200, J?r?me Loyet wrote:

> location ~ \.php$ {
>   proxy_cache none;

-   proxy_cache none;
+   proxy_cache off;

> }
>
> it should do the trick
>
> ++ jerome
> 2009/5/28 perlish <[hidden email]>:
> > Hi all:
> >  When I use nginx-0.7.59 as a revers proxy and cache server,it also cache the php file,how to make it not cache php file ?
> > I thought the php file is not need to be cached.
> >
> > Posted at Nginx Forum: http://forum.nginx.org/read.php?2,2437,2437#msg-2437
> >
> >
> >

--
Igor Sysoev
http://sysoev.ru/en/