Я смог придумать только такое:<br><br><br><span style="font-family: courier new,monospace;">location ~ ^(какие-урлы-кэшировать)$ {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    set $test_cache_on &quot;$cookie_debugMode$arg_nc$еще_что_должно_быть_пусто&quot;;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    if ($test_cache_on = &quot;&quot;) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        rewrite .* /php_cache last;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    rewrite ^(.*)$ /index.php?$1 last;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">location /php_cache_rotate {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    internal;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    fastcgi_pass           <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    fastcgi_param          SCRIPT_FILENAME $document_root/index.php;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    include fastcgi_params;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    fastcgi_cache your_zone;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    fastcgi_cache_valid 60m;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    fastcgi_cache_key &quot;host=$host|uri=$request_uri|еще-от-чего-зависит-кэш&quot;;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;">
<br><br>Если есть более оптимальные варианты, буду рад услышать.<br><br><br><br><br><div class="gmail_quote">2009/10/6 <a href="http://1nsk.ru">1nsk.ru</a> <span dir="ltr">&lt;<a href="mailto:alfa@1nsk.ru">alfa@1nsk.ru</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">А как обернуть всё это дело в<br>
<br>
?<br>
if ($http_cookie !~ &quot;user_id&quot;) {<br>
#кэшируем только гостям<br>
}<br>
<br>
А то в if нельзя fastcgi_store<br>
<br>
spall пишет:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Спасибо большое. В следущий раз буду внимательней читать доки.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?21,11465,11472#msg-11472" target="_blank">http://forum.nginx.org/read.php?21,11465,11472#msg-11472</a><br>
<br>
<br>
<br>
  <br>
</blockquote>
<br>
<br>
</blockquote></div><br>