cyhone
cyhone
@guodastanson 工作中很少用到mysql了。所以一直没有这方面的需求。 不过列在todo里的几个feature最近有时间会做下。 老哥对这个东西有什么建议吗?
This feature is more appropriate to implement in CacheStore. For local memory cache store, ttlcache support to extend the cache duration on cache hit. But the default constructor disable the...
> Agree above. The method `CachePage` is NOT safe in high-concurrency. It will cause wrong-repeating data in response. There is a simple code demo: > > ``` > r.GET("/data", cache.CachePage(redisCache,...
> > > Agree above. The method `CachePage` is NOT safe in high-concurrency. It will cause wrong-repeating data in response. There is a simple code demo: > > > ```...
I can't reproduce this issue in my environment, are you using the latest version of gin-cache?
我看代码设计,Accpetor所在的EventLoop是可以共享的,但是EventLoopThreadPool是不可以的. 这么设计的原因是什么呢?有没有考虑加入共享EventLoopThreadPool的功能?
CacheByRequestBody is interesting. And I left some code review in this pr~
Maybe you can use the CacheStore.Delete or CacheStore.Set directly? https://github.com/chenyahui/gin-cache/blob/main/persist/cache.go#L20
That is indeed a good suggestion, and I will consider implementing it as soon as possible. If you have the time, feel free to submit a pull request as well.
In your scenario, is the response not required in any case (regardless of requesting the backend or not)? Only used to refresh cache?