Skip to content

Commit

Permalink
fix infinite cache time issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Mar 5, 2024
1 parent 202ab7b commit b012f9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ type httpCacheWrapper struct {
}

func (c httpCacheWrapper) Set(key string, value []byte) {
c.c.SetBytes(key, value, CacheOpt{})
c.c.SetBytes(key, value, CacheOpt{
Expiration: time.Hour,
})
}

func (c httpCacheWrapper) Get(key string) (value []byte, ok bool) {
Expand Down

0 comments on commit b012f9e

Please sign in to comment.