You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by arian487 <ak...@tagged.com> on 2011/07/04 04:52:47 UTC

Custom Cache cleared after a commit?

I know the queryResultCache and stuff live only so long as a commit happens
but I'm wondering if the custom caches are like this as well?  I'd actually
rather have a custom cache which is not cleared at all.  I want to give the
elements of this Cache a 6 hour TTL (or some time frame) but I never want it
to clear on a commit.  Is this possible using SolrCache?

--
View this message in context: http://lucene.472066.n3.nabble.com/Custom-Cache-cleared-after-a-commit-tp3136345p3136345.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Custom Cache cleared after a commit?

Posted by arian487 <ak...@tagged.com>.
Sorry for my ignorance, but do you have any lead in the code on where to look
for this?  Also, I'd still need a way of finding out how long its been in
the cache because I don't want it to regenerate every time.  I'd want it to
regenerate only if its been in the cache for less then 6 hours (or some time
frame which I deem to be good).  Thanks

--
View this message in context: http://lucene.472066.n3.nabble.com/Custom-Cache-cleared-after-a-commit-tp3136345p3141673.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Custom Cache cleared after a commit?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Mon, Jul 4, 2011 at 2:07 AM, arian487 <ak...@tagged.com> wrote:
> I guess I'll have to use something other then SolrCache to get what I want
> then.  Or I could use SolrCache and just change the code (I've already done
> so much of this anwyways...).  Anyways thanks for the reply.

You can specify a regenerator for your cache that examines items in
the old cache and pre-populates the new cache when a commit happens.

-Yonik
http://www.lucidimagination.com

Re: Custom Cache cleared after a commit?

Posted by arian487 <ak...@tagged.com>.
I guess I'll have to use something other then SolrCache to get what I want
then.  Or I could use SolrCache and just change the code (I've already done
so much of this anwyways...).  Anyways thanks for the reply.  

--
View this message in context: http://lucene.472066.n3.nabble.com/Custom-Cache-cleared-after-a-commit-tp3136345p3136580.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Custom Cache cleared after a commit?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Jul 3, 2011 at 10:52 PM, arian487 <ak...@tagged.com> wrote:
> I know the queryResultCache and stuff live only so long as a commit happens
> but I'm wondering if the custom caches are like this as well?  I'd actually
> rather have a custom cache which is not cleared at all.

That's not currently possible.
The nature of Solr's caches are that they are completely transparent -
it doesn't matter if a cache is used or not, the response should
always be the same.  This is analogous to caching the fact that 2*2 =
4.  Put another way, Solr's caches are only for increasing request
throughput, and should not affect what response a client receives.

-Yonik
http://www.lucidimagination.com