mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
cache the "tree"
This commit is contained in:
@@ -6,6 +6,8 @@ import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
||||
import com.commafeed.backend.model.Feed;
|
||||
import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.model.User;
|
||||
import com.commafeed.frontend.model.Category;
|
||||
|
||||
public abstract class CacheService {
|
||||
|
||||
@@ -13,9 +15,15 @@ public abstract class CacheService {
|
||||
|
||||
public abstract void setLastEntries(Feed feed, List<String> entries);
|
||||
|
||||
public String buildKey(Feed feed, FeedEntry entry) {
|
||||
public String buildUniqueEntryKey(Feed feed, FeedEntry entry) {
|
||||
return DigestUtils.sha1Hex(entry.getGuid() +
|
||||
entry.getUrl());
|
||||
}
|
||||
|
||||
public abstract Category getRootCategory(User user);
|
||||
|
||||
public abstract void setRootCategory(User user, Category category);
|
||||
|
||||
public abstract void invalidateRootCategory(User... users);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user