Fastcgi cache

Igor Sysoev is at rambler-co.ru
Wed May 13 08:25:27 MSD 2009


On Wed, May 13, 2009 at 12:06:33AM -0400, Jim Ohlstein wrote:

> Igor Sysoev Wrote:
> -------------------------------------------------------
> > On Sat, May 09, 2009 at 03:02:53PM -0400, Jim
> > Ohlstein wrote:
> > 
> > > Is there any way to set the it just to cache
> > image and other media files, but not text/html? I
> > only see based on response in the Russian docs
> > (best as I can understand). Is that something that
> > can be added or is planned?
> > 
> > No, currently nginx can not cache using
> > content-type, but it can be easy
> > added. Also you may use location to separate
> > responses.
> > 
> 
> Can you give a sample configuration of how that would work.
> 
> I have tried putting location blocks in and out of the main fastcgi_pass block without any success.

location ~ \.php$ {
     fastcgi_pass  ...
}

location ~ \.(jpg|gif|png)$ {
     fastcgi_pass  ...
     fastcgi_cache ...
}


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





More information about the nginx mailing list