Pacific73 / gorm-cache

gorm v2的即插即用、无需修改代码的旁路缓存。An easy-to-use look-aside cache solution for gorm v2 users.
Apache License 2.0
111 stars 29 forks source link

upgrade go-redis to v8 and ccache to v3 #23

Closed rts-gordon closed 1 year ago

rts-gordon commented 1 year ago

Hi @Pacific73 I have upgraded go-redis to v9 and ccache to v3, they are the latest versions.

I tested the latest version code, save data to Redis and Memory, all passed.

Can you please take a look at this PR, thank you.

PS1: repo "https://github.com/go-redis/redis" has relocate to "https://github.com/redis/go-redis" PS2: repo "https://github.com/karlseguin/ccache/v3" uses the generic declaration

asjdf commented 1 year ago

Hi, I made a copy and added more features (including using the latest dependence.) and I hope this repo helps you. https://github.com/asjdf/gorm-cache

rts-gordon commented 1 year ago

Hi, I made a copy and added more features (including using the latest dependence.) and I hope this repo helps you. https://github.com/asjdf/gorm-cache

Is there a plan to support multi tenant? https://github.com/Pacific73/gorm-cache/issues/22

asjdf commented 1 year ago

Hi, I made a copy and added more features (including using the latest dependence.) and I hope this repo helps you. https://github.com/asjdf/gorm-cache

Is there a plan to support multi tenant? https://github.com/Pacific73/gorm-cache/issues/22

In fact, the multi-tenant example you mentioned, I think is mainly due to the library's poor primary key cache logic, which I would like to optimize in my repo. I also hope that my experiment will help this repo.

rts-gordon commented 1 year ago

Yes, agree with you. If the client can define the Redis cache KEY themselves, we can implement the multi tenant, may be more features.