Hi,

I'm trying out CachingRecommender to see how much it improves performance for 
me (it does a lot when the cache is all warmed up).
One thing that I assumed would happen automatically is that the 
CachingRecommender will be refreshed when the underlying file (FileDataModel) 
is refreshed.  Instead, I do see the FDM re-reading the input file when it 
detects the change, but my recommendations remain cached forever, as I'm not 
hitting memory limits.

I've been looking at the code, but can't see a clean way to "listen" to the FDM 
and find out when it finished re-reading the file, so I can clear my 
CachingRecommender.  Is there an existing way this should be done that I'm just 
not seeing in the code?

Ah, I see another thing now.  Consider this:

    Recommender recommender = new BooleanUserGenericUserBasedRecommender(model, 
hood, similarity);
    recommender = new CachingRecommender(recommender);

Now if I did somehow find a way to clear the caching recommender, I imagine I'd 
want to call one of its clear(...) methods, and this requires a cast back to 
CachingRecommender.  Is there a better way?

Thanks,
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

Reply via email to