add GetExtendTTL

This commit is contained in:
Drew Weymouth
2023-02-02 16:15:29 -08:00
parent 867461dab5
commit 261726a5c6
2 changed files with 16 additions and 1 deletions
+2 -1
View File
@@ -42,7 +42,8 @@ func NewImageManager(ctx context.Context, s *ServerManager, baseCacheDir string)
}
func (i *ImageManager) GetAlbumThumbnailFromCache(albumID string) (image.Image, bool) {
if img, err := i.thumbnailCache.GetResetTTL(albumID, true); err == nil && img != nil {
img, err := i.thumbnailCache.GetExtendTTL(albumID, i.thumbnailCache.DefaultTTL)
if err == nil && img != nil {
return img, true
}
return nil, false