We've been using Varnish (http://varnish.projects.linpro.no/) in front
of our Solr servers, and have been seeing about a 70% hit rate for the
queries. We're using SolrJ, and have seen no bad effects of the cache.
That said, we're just caching everything for a few minutes. We don't
pick and choose which queries get cached in Varnish, and our business
users are fine with the index being a few minutes stale as the TTL
expires on the cache. I don't think solr has a way to, at query time,
change the cache control headers.
http://wiki.apache.org/solr/SolrAndHTTPCaches may be a good jumping
off point for more thought.
Thanks for your time!
Matthew Runo
Software Engineer, Zappos.com
[EMAIL PROTECTED] - 702-943-7833
On Oct 15, 2008, at 9:24 AM, Jon Baer wrote:
Hi,
What is the proper behavior suppose to be between SolrJ and
caching? Im proxying through a framework and wondering if it is
possible to turn on / turn off caching programatically depending on
the type of query (or if this will have no effect whatsoever) ...
since SolrJ uses Apache HTTP client libs can it negotiate anything
here?
SOLR-127: HTTP Caching awareness. Solr now recognizes HTTP Request
headers related to HTTP Caching (see RFC 2616 sec13) and will
respond
with "304 Not Modified" when appropriate. New options have been
added
to solrconfig.xml to influence this behavior.
(Thomas Peuss via hossman)
Thanks.
- Jon