That's fine, though user@ is also fine since that way other users see the question.
Yes that's actually important, as you don't want it to cache the recommendation for the anonymous user, since it could then be reused for another totally different user. Your proposal would fix it, though kinda couples the caching wrapper to a particular implementation. Maybe that's a minor sin, to consider Long.MIN_VALUE a special case user ID across the board. In this case, the only possible bad effect is that it doesn't cache result for one user, which is nothing. On Wed, Oct 27, 2010 at 9:17 AM, Philippe Adjiman <[email protected]> wrote: > Hi, > > I'm not part of the dev team but as my question relates directly to mahout > (taste) code I'm sending that email to the dev team. > > When using a cachingRecommender, if recommendations are requested for an > anonymous user (using a plusAnonymousDataModel) I wondered if caching those > recommendations was not a waste of a cache entry (as the user is > temporary). > > So, does it makes sense to add in the *recommend* method of the > CachingRecommender class a filter that will not cache the recommendation of > a user having the id Long.MIN_VALUE (which is the user id of a temporary > user as I saw in the PlusAnonymousUserDataModel class)? > > Thanks, > Philippe Adjiman. >
