强制刷新 (shift + reload) nginx不支持。但nginx作者有自己的意见,详见igor的解释。<br>这个我觉得都有道理<br><br><div class="gmail_quote">2009/8/4 Mirosław Jaworski <span dir="ltr"><<a href="mailto:mjaw@ikp.pl">mjaw@ikp.pl</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, 2009-08-03 at 16:34 +0400, Igor Sysoev wrote:<br>
> > > No, currently nginx ignores the reload because everyone may flush<br>
> > > popular and heavy generated pages from your cache.<br>
> > > I plan to allow reload only from limited set of addresses.<br>
> ><br>
> > Cache-control: no-cache request isn't supposed to revalidate/invalidate<br>
> > cache.<br>
> ><br>
> > Logic is fairly trivial - exactly as i showed in my nonexisting<br>
> > variable/wrong syntax example - nginx should simply omit checking<br>
> > the cache when receiving such request, go for the backend and serve<br>
> > backend's response without doing anything to the cache.<br>
><br>
> RFC does not say that server must not cache this response, it just says<br>
> that is must bot use previously cached response.<br>
<br>
</div>Yet nginx does use cached response, breaking it. That's the most<br>
important part which needs addressing.<br>
<br>
My suggestion not only complies with RFC but also allows to avoid<br>
treating "Cache-control: no-cache" request as uncontrollable way to<br>
tamper with the cache.<br>
<div class="im"><br>
> Anyway, "Cache-control" should be supported from trusted addresses only:<br>
> nginx is not generic transit proxy, it's accelerator, it's just part<br>
> of web-server.<br>
<br>
</div>And should comply with RFC as such. It may be a nice _feature_<br>
for some to limit it using some cache_control_restrict though.<br>
<br>
Back to the problem - if i can't use cache depend on some request<br>
header, can i make it IP dependent?<br>
<div class="im"><br>
--<br>
Mirosław "Psyborg" Jaworski<br>
GCS/IT d- s+:+ a C++$ UBI++++$ P+++$ L- E--- W++(+++)$ N++ o+ K- w-- O-<br>
M- V- PS+ PE++ Y+ PGP t 5? X+ R++ !tv b++(+++) DI++ D+ G e* h++ r+++ y?<br>
</div> "If at first you don't succeed, redefine success."<br>
<br>
<br>
</blockquote></div><br>