You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Matthias Böhmer <ma...@googlemail.com> on 2010/10/15 17:16:15 UTC

Caching a DataModel

There are implementations for caching recommenders, item similarity and user similarity. Am I wrong, or is there no cache for DataModel? If so, why not?

Best,
Matthias

Re: Caching a DataModel

Posted by Sean Owen <sr...@gmail.com>.
There is not. The theory is that the DataModel's job is to always give fresh
data, and let it be cached from there. The weak argument is that if it's
already in memory, then caching doesn't help, and if it's not, it's probably
too big to meaningfully cache. And in fact all the DataModels are in memory
anyway except the JDBC ones.

You may be asking, anyway, is there some way to periodically load an entire
DataModel into memory from some backing store? FileDataModel does this
already, really. I did create at one point a reloading wrapper like this for
use on top of a small database. The tradeoff made sense for that app. I
could dig it out and clean it up.

2010/10/15 Matthias Böhmer <ma...@googlemail.com>

> There are implementations for caching recommenders, item similarity and
> user similarity. Am I wrong, or is there no cache for DataModel? If so, why
> not?
>
> Best,
> Matthias