Load cache asynchronously

This commit is contained in:
Deluan
2020-07-24 15:40:27 -04:00
parent a0bed9beeb
commit 9b1d5c196f
9 changed files with 134 additions and 46 deletions
+2 -1
View File
@@ -30,7 +30,8 @@ var _ = Describe("Cover", func() {
BeforeEach(func() {
conf.Server.DataFolder, _ = ioutil.TempDir("", "file_caches")
conf.Server.ImageCacheSize = "100MB"
cache, _ := NewImageCache()
cache := NewImageCache()
Eventually(func() bool { return cache.Ready() }).Should(BeTrue())
cover = NewCover(ds, cache)
})