Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gcache

> 数据库
Open source

gcache是gorm的中间件,插入后gorm即刻拥有缓存。

388 stars0 likes2 views
WebsiteGitHub

About

gcache是gorm的中间件,插入后gorm即刻拥有缓存。

gcache

gcache是gorm的中间件,插入后gorm即刻拥有缓存。

Overview

  • 即插即用
  • 旁路缓存
  • 数据源使用 Redis
  • 防击穿
  • 防穿透

安装

bash
$ go get github.com/8treenet/gcache

快速使用

…

约定

  • 模型必须指明主键 gorm:"primary_key"
  • 不支持 Group
  • 不支持 Having
  • 查询条件和查询参数分离

Example

bash
    #查看 example_test.go 了解更多。
    more src/github.com/8treenet/gcache/example/example_test.go

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gocachegcachegormgorm-cache

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库