persist read status instead of unread status

This commit is contained in:
Athou
2013-07-22 16:31:29 +02:00
parent e9cc6fd518
commit 074ecbf159
9 changed files with 160 additions and 268 deletions

View File

@@ -113,7 +113,8 @@ public class FeedSubscriptionService {
Map<Long, Long> map = cache.getUnreadCounts(user);
if (map == null) {
log.debug("unread count cache miss for {}", Models.getId(user));
map = feedEntryStatusDAO.getUnreadCount(user);
List<FeedSubscription> subs = feedSubscriptionDAO.findAll(user);
map = feedEntryStatusDAO.getUnreadCount(subs);
cache.setUnreadCounts(user, map);
}
return map;