On 5/10/06, Erik Hatcher <[EMAIL PROTECTED]> wrote:
I've started down this route, but I'm not sure how to initialize my
cache the first time.
I need access to the IndexReader to build the cache, and at this
point I don't need any incremental cache updates - if a new
IndexSearcher is swapped in, I want to rebuild the cache.
Should I combine a custom SolrCache with a newSearcher listener to
have it generated right away? I put in a dummy cache and
regenerator, but only see the cache .init() method being called, not
the warm() method (on application server startup). How can I
bootstrap it such that my cache gets built on app. startup?
If your cache is populated as the result of any request to your
plugin, simply send a request via a firstSearcher hook. If it's not
populated for any request, then send a special request that your
plugin would recognize as a "populate cache" request.
-Yonik