MM-16921 Fix getPostsSince caching invalid data (#11618)
* MM-16921 Fix getPostsSince caching invalid data * Remove workaround for invalid caching
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8f4e03a52b
Коммит
767a506889
@@ -335,7 +335,7 @@ func (s *SqlPostStore) InvalidateLastPostTimeCache(channelId string) {
|
||||
|
||||
func (s *SqlPostStore) GetEtag(channelId string, allowFromCache bool) string {
|
||||
if allowFromCache {
|
||||
if cacheItem, ok := s.lastPostTimeCache.Get(channelId); ok && cacheItem.(int64) > 0 {
|
||||
if cacheItem, ok := s.lastPostTimeCache.Get(channelId); ok {
|
||||
if s.metrics != nil {
|
||||
s.metrics.IncrementMemCacheHitCounter("Last Post Time")
|
||||
}
|
||||
@@ -554,7 +554,7 @@ func (s *SqlPostStore) GetPostsSince(channelId string, time int64, allowFromCach
|
||||
|
||||
list := model.NewPostList()
|
||||
|
||||
var latestUpdate int64 = 0
|
||||
latestUpdate := time
|
||||
|
||||
for _, p := range posts {
|
||||
list.AddPost(p)
|
||||
|
||||
Ссылка в новой задаче
Block a user