Inconsistency about cache's valid_sec

Maxim Dounin mdounin at
Thu Jul 20 13:11:28 UTC 2017


On Thu, Jul 20, 2017 at 10:22:46AM +0800, Peng Fang wrote:

> From my side, this is a compromise for reality. Because not all upstream
> servers are controlled by ourselves, especially for a 3rd CDN provider.
> There are many customers who want to get highly customized expiration
> settings, for example, 10 senconds for */a.jpg, 1 minite for */b.jpg, 10
> minites for *.zip and so on,but they don't what to control thsese settings
> by sending Cache-Control family headers. So we have implemented a delicate
> logic in header filters supportting these requirements for every request.
> Since it does not meet the standards, there is indeed no reson for you to
> change the existed code logic. We coud totaly ignore and hide cache-control
> family headers for these customuers, and keep on setting valid_sec in
> header filters.
> Woud you mind giving some advices for this kind of scenario? Thanks very
> much.

An obvious though suboptimal solution would be to use a separate 
proxy layer which will add appropriate headers to control caching.

Maxim Dounin

More information about the nginx-devel mailing list