gin-cache
gin-cache copied to clipboard
:rocket: A high performance gin middleware to cache http response. Compared to gin-contrib/cache, It has a huge performance improvement. 高性能gin缓存中间件,相比于官方版本,有巨大性能提升。
Hi, Thanks for this package, works nicely. Would it be possible to get an Option to extend the cache duration on a cache hit? Thanks
Cannot use 'global.App.Redis' (type *"github.com/go-redis/redis/v9".Client) as the type *"github.com/go-redis/redis/v8".Client 本地用的 v9 版本的包,发现您包里没有对应的。
```go package main import ( "strings" "time" cache "github.com/chenyahui/gin-cache" "github.com/chenyahui/gin-cache/persist" "github.com/gin-gonic/gin" "github.com/nanmu42/gzip" ) func main() { app := gin.New() app.Use(gzip.DefaultHandler().Gin) memoryStore := persist.NewMemoryStore(1 * time.Minute) body := strings.Repeat("hello world", 100)...
provide an option to only update cache no matter cache be hit or missed to meet some business logic requirements.
Need a way to invalidate a key/reset cache when updates are made to the cached resources. For eg: if the resource is cached, and one of the resource properties is...
Some variable should be private in struct because you may replace it by other ones.
Hi there There are two time duration of gin-cache: persist.NewMemoryStore(), cache.CacheByRequestURI, what's the difference between them? Can they merge into one time duration? ``` memoryStore := persist.NewMemoryStore(1 * time.Minute) app.GET("/hello",...
`Cache *ttlcache.Cache` should be private in MemoryStore because you may replace it by other cache implentations.
update all dependency to latest