Migrating file info store cache to the cache layer (#13045)

* Migrating file info store cache to the cache layer

* Remove unrelated changes

* Updating timer layer store

* Fixing usage of invalidate cache

* Removed repeated tests and unnecesiary require

* Using doInvalidateCacheCluster instead of removing the cache directly

* Addressing PR comments

* Fixing imports

* Fixing tests

* Fixing license header
Этот коммит содержится в:
Jesús Espino
2020-03-09 18:34:25 +01:00
коммит произвёл GitHub
родитель b70d5df5c2
Коммит cd382412fd
11 изменённых файлов: 167 добавлений и 52 удалений

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

@@ -1141,7 +1141,8 @@ func (a *App) GetFileInfosForPostWithMigration(postId string) ([]*model.FileInfo
post := result.Data.(*model.Post)
if len(post.Filenames) > 0 {
a.Srv().Store.FileInfo().InvalidateFileInfosForPostCache(postId)
a.Srv().Store.FileInfo().InvalidateFileInfosForPostCache(postId, false)
a.Srv().Store.FileInfo().InvalidateFileInfosForPostCache(postId, true)
// The post has Filenames that need to be replaced with FileInfos
infos = a.MigrateFilenamesToFileInfos(post)
}