public class SimpleCachingItemScorer extends AbstractItemScorer
A simple cached item scorer that remembers the result for the last user id it scored.
Constructor and Description |
---|
SimpleCachingItemScorer(ItemScorer sc) |
Modifier and Type | Method and Description |
---|---|
ResultMap |
getCache() |
long |
getId() |
ResultMap |
scoreWithDetails(long user,
Collection<Long> items)
Score a collection of items and potentially return more details on the scores.
|
score, score
@Inject public SimpleCachingItemScorer(ItemScorer sc)
@Nonnull public ResultMap scoreWithDetails(long user, @Nonnull Collection<Long> items)
ItemScorer
Score a collection of items and potentially return more details on the scores.
user
- The user ID for whom to generate scores.items
- The item to score.ResultMap
that provides access to those details.public long getId()
public ResultMap getCache()