/** * Clears cached recommendations for the given user. * * @param userID clear cached data associated with this user ID */ public void clear(final long userID) { log.debug("Clearing recommendations for user ID '{}'", userID); recommendationCache.remove(userID); estimatedPrefCache.removeKeysMatching( new Cache.MatchPredicate<LongPair>() { @Override public boolean matches(LongPair userItemPair) { return userItemPair.getFirst() == userID; } }); }