Skip to content

Commit

Permalink
update: use default expiration for NoExpiration setting
Browse files Browse the repository at this point in the history
  • Loading branch information
HolgerHuo committed Feb 6, 2024
1 parent 579f482 commit 99379e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"path"
"path/filepath"
"strings"
"time"
"webp_server_go/config"
"webp_server_go/helper"

"github.com/gofiber/fiber/v2"
"github.com/h2non/filetype"
"github.com/patrickmn/go-cache"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -94,7 +94,7 @@ func fetchRemoteImg(url string, subdir string) config.MetaFile {
log.Infof("Remote Addr is %s, pinging for info...", url)
etag = pingURL(url)
if cacheKey != "" {
config.RemoteCache.Set(cacheKey, etag, time.Duration(config.Config.CacheTTL) * time.Second)
config.RemoteCache.Set(cacheKey, etag, cache.DefaultExpiration)
}

}
Expand Down

0 comments on commit 99379e7

Please sign in to comment.