Git Product home page Git Product logo

Comments (2)

liyuan1125 avatar liyuan1125 commented on June 10, 2024 1

嗯,当初做这个库也是心血来潮,很多地方没有考虑到

按照目前的方式,缓存更新还无法做到,因为缓存key是sql语句

能想到的方式就是操作数据时删除所有缓存

或者自定义key可以做到;

例如查询所有指定用户

SELECT * FROM users where name = 'gorm';

将以上sql语句编码后作为key
删除时就比较麻烦了

可以想办法将key的规则定义一下
例如 tableName+where
删除的时候也是 tableName+where

这样的话或许可以
有时间可以优化下,您如果有好的想法欢迎PR

from gorm-cache.

Dboy233 avatar Dboy233 commented on June 10, 2024

我也是在,gorm的提议中看到你的评论所以看了看,不过也有比较完善的缓存库,反正都是基于gorm的plugin 做的原理都一样。说实话,我是开发移动端的,golang 也是自己业余一直在学习,还处于新手

from gorm-cache.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.