: Are any of you using Solr Http caching? I am interested to see how people
: use this functionality. I have an index that basically changes once a day
: at midnight. Is it okay to enable Solr Http caching for such an index and
: set the max age to 1 day? Any potential issues?
: 
: I am using solr 3.5 with SolrJ.

in a past life i put squid in front of solr as an accelerator.  i didn't 
bother configuring solr to output expiration info in the Cache-Control 
header, i just took advantage of the etag generated from the index 
version (as well as lastModifiedFrom="openTime") to ensure tha Solr would 
short circut and return a 304 w/o doing any processing (or wasting a lot 
of bandwidth returning data) anytime it got an If-Modified-Since or 
If-None-Match request indicating that the cache already had a current 
copy.

If you know your index only changes ever 24 hours, then setting a max-age 
would probably make sense, to elimianate even those conditional requests, 
but i wouldn't set it to 24H (what if a request happens 1 minute before 
your daily rebuild?) set it to whatever the longest amount of time you are 
willing to serve stale results.

-Hoss

Reply via email to