solr的httpCaching
solr的httpCaching需要配置:<requestDispatcher handleSelect="true" >
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
<cacheControl>max-age=600, must-revalidate</cacheControl>
</httpCaching>
</requestDispatcher>
这段配置将cache600秒, 通过浏览器访问可以成功出现304,但python客户端去没有效果,原因是http cache如果要生效的话,需要客户端把last_modify_time传给服务器,比如这样:
curl -v -z "Mon, 24 Jul 2012 22:45:42 GMT" "http://127.0.0.1:7100/solr/feed/select/?q=NOT+id%3A0&version=2.2&start=0&rows=10&indent=on"
研究下来感觉httpCahing是给浏览器用的,不是给程序用的。
页:
[1]