lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: To warm the whole cache of Solr other than the only autowarmcount
Date Mon, 28 Jul 2014 13:15:45 GMT
On 7/28/2014 12:06 AM, YouPeng Yang wrote:
>   No affense to your work,I am still confusing about the cache warm
> processing about your explanation.So I check the warm method of
> FastLRUCache as [1].
>   As far as I see,there is no values refresh during the the warm
> processing. the  *regenerator.regenerateItem* just put the old value to the
> new cache.

What the cache code does is pass the key and the value from the current
cache entry to the CacheRegenerator.regenerateItem method, which is
defined elsewhere when the cache is created.  I thought it was just the
key, but now that I look closer, it is both.  Exactly what is done with
that information is completely up to the regenerator object.  The cache
unit tests use a NoOpRegenerator, which simply populates the new cache
with the entire old entry, including the value.  That is not how things
work with the actual production caches, though.

With filterCache and queryResultCache, the key contains the query, and
the regenerator is set up to execute the query against the live index
and insert the new value in the new cache.  I've never looked deeply
into the regenerator code.

Thanks,
Shawn


Mime
View raw message