mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
denormalized fields on statuses for faster queries
This commit is contained in:
@@ -75,12 +75,11 @@ public class FeedUpdateService {
|
||||
List<FeedEntryStatus> statusUpdateList = Lists.newArrayList();
|
||||
List<User> users = Lists.newArrayList();
|
||||
for (FeedSubscription sub : subscriptions) {
|
||||
FeedEntryStatus status = new FeedEntryStatus();
|
||||
status.setEntry(update);
|
||||
User user = sub.getUser();
|
||||
FeedEntryStatus status = new FeedEntryStatus(user, sub, update);
|
||||
status.setSubscription(sub);
|
||||
statusUpdateList.add(status);
|
||||
|
||||
users.add(sub.getUser());
|
||||
users.add(user);
|
||||
}
|
||||
cache.invalidateUserData(users.toArray(new User[0]));
|
||||
feedEntryDAO.saveOrUpdate(update);
|
||||
|
||||
Reference in New Issue
Block a user