How to set the minimum size of the cache file

Mirosław Jaworski mjaw at
Wed Sep 16 14:38:27 MSD 2009

On Wed, 2009-09-16 at 17:56 +0800, Chancey wrote:
> Back-end to provide search suggest services .
> Example:
> Two request url:
> a . http://xxx/a?q=a 
> b . http://xxx/a?q=b
> Response results :
> a. xxxxxxxxxx
> b. null
> The results of a need to be cached , b don't need.

You can run nginx without caching enforcement ( don't use
proxy_cache_valid ) and modify(*) "search suggest service" so it will
return headers allowing caching for responses other that null.

(*) very likely modification is adding single line of code setting
    "Expire:" header before returning result.
Mirosław "Psyborg" Jaworski
GCS/IT d- s+:+ a C++$ UBI++++$ P+++$ L- E--- W++(+++)$ N++ o+ K- w-- O-
M- V- PS+ PE++ Y+ PGP t 5? X+ R++ !tv b++(+++) DI++ D+ G e* h++ r+++ y?
    "Never let your sense of morals get in the way of doing what's right."

More information about the nginx mailing list