Add a cache for gallery thumbnails (#496)

This commit is contained in:
bnkai
2020-05-11 10:20:08 +03:00
committed by GitHub
parent 8ba76783b0
commit bd45daacf3
36 changed files with 319 additions and 1200 deletions

View File

@@ -38,6 +38,13 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input models.Co
config.Set(config.Generated, input.GeneratedPath)
}
if input.CachePath != nil {
if err := utils.EnsureDir(*input.CachePath); err != nil {
return makeConfigGeneralResult(), err
}
config.Set(config.Cache, input.CachePath)
}
if input.MaxTranscodeSize != nil {
config.Set(config.MaxTranscodeSize, input.MaxTranscodeSize.String())
}