MM-16921 Fix getPostsSince caching invalid data (#11618)

* MM-16921 Fix getPostsSince caching invalid data

* Remove workaround for invalid caching
Этот коммит содержится в:
Harrison Healey
2019-07-15 11:26:21 -04:00
коммит произвёл GitHub
родитель 8f4e03a52b
Коммит 767a506889
2 изменённых файлов: 107 добавлений и 81 удалений

Просмотреть файл

@@ -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)