Set unsplash empty collection caching to one hour

This commit is contained in:
kolaente 2020-05-31 20:50:51 +02:00
parent ebfa982c72
commit 8f35b9d579
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -135,7 +135,7 @@ func (p *Provider) Search(search string, page int64) (result []*background.Image
var existsForPage bool var existsForPage bool
if emptySearchResult != nil && if emptySearchResult != nil &&
time.Since(emptySearchResult.lastCached) < time.Minute { time.Since(emptySearchResult.lastCached) < time.Hour {
_, existsForPage = emptySearchResult.images[page] _, existsForPage = emptySearchResult.images[page]
} }