gin-contrib / cache

Gin middleware/handler to enable Cache
https://gin-gonic.github.io/gin
MIT License
364 stars 95 forks source link

fix when cache file size big than 32*1024 #74

Open zonghuili2019 opened 2 years ago

zonghuili2019 commented 2 years ago

when cache the file, if file size big than 32*1024,there is a bug in the function cachedWriter:Write. the copyBuffer function in the io.go file will call Write function multile times。 go version is 1.14.1,gin1.7.1, the way is gin.Default().Static("/static", "./static").