mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-30 23:50:04 +03:00
resources/images: Make the image cache more robust
Also allow timeout to be set as a duration string, e.g. `30s`. Fixes #6501
This commit is contained in:
parent
031f948f87
commit
d6f7a9e28d
11 changed files with 85 additions and 32 deletions
4
cache/filecache/filecache_test.go
vendored
4
cache/filecache/filecache_test.go
vendored
|
@ -250,9 +250,9 @@ func TestFileCacheReadOrCreateErrorInRead(t *testing.T) {
|
|||
|
||||
var result string
|
||||
|
||||
rf := func(failLevel int) func(info ItemInfo, r io.Reader) error {
|
||||
rf := func(failLevel int) func(info ItemInfo, r io.ReadSeeker) error {
|
||||
|
||||
return func(info ItemInfo, r io.Reader) error {
|
||||
return func(info ItemInfo, r io.ReadSeeker) error {
|
||||
if failLevel > 0 {
|
||||
if failLevel > 1 {
|
||||
return ErrFatal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue