Comments (2)
嗯,当初做这个库也是心血来潮,很多地方没有考虑到
按照目前的方式,缓存更新还无法做到,因为缓存key是sql语句
能想到的方式就是操作数据时删除所有缓存
或者自定义key可以做到;
例如查询所有指定用户
SELECT * FROM users where name = 'gorm';
将以上sql语句编码后作为key
删除时就比较麻烦了
可以想办法将key的规则定义一下
例如 tableName
+where
删除的时候也是 tableName
+where
这样的话或许可以
有时间可以优化下,您如果有好的想法欢迎PR
from gorm-cache.
我也是在,gorm的提议中看到你的评论所以看了看,不过也有比较完善的缓存库,反正都是基于gorm的plugin 做的原理都一样。说实话,我是开发移动端的,golang 也是自己业余一直在学习,还处于新手
from gorm-cache.
Related Issues (4)
- 缓存key有问题 HOT 2
- Redis 支持 V9
- 新版本的思路 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gorm-cache.