rockscache icon indicating copy to clipboard operation
rockscache copied to clipboard

The First Redis Cache Library To Ensure Eventual Consistency And Strong Consistency With DB.

Results 9 rockscache issues
Sort by recently updated
recently updated
newest added

公司:托云信息技术(成都)有限公司 官网:www.rentsoft.cn Github: https://github.com/OpenIMSDK/ 地点:成都 问题场景:IM发群组消息缓存一致性问题, 优化项目缓存体系 功能:rockscache 二阶消息 logo: ![image](https://user-images.githubusercontent.com/58578570/180162141-cd452acc-09fb-4dff-9fec-f47ae7078480.png) _Originally posted by @wangchuxiao-dev in https://github.com/dtm-labs/dtm/issues/7#issuecomment-1191172088_

add FetchWithCodec

在官方示例项目dtm-cases中,将项目启动起来,浏览器输入:http://localhost:8081/api/busi/atomic?mode=dtm,测试报错,提示: ERR Error running script (call to f_551fcfca51cfb60a31372a5725cc8866a19a89c1): @user_script:2: WRONGTYPE Operation against a key holding the wrong kind of value

目前 options 中没有字段可以配置统一前缀,如果 Redis 服务器是多场景使用时,我必须要在每次设置缓存时,自定义 key 加统一前缀,如果可以设置统一前缀,可以统一管理,这对于使用更加友好

```golang client := redis.NewClient(&redis.Options{ Addr: "localhost:6379", Password: "", DB: 0, // use default DB }) rc := rockscache.NewClient(client, rockscache.NewDefaultOptions()) rc.Fetch("test1", 60 * time.Second, func () (string, error) { return "test1",...

Why think that when the data is not empty, the lock expires and the data also expires?Why not use the TagAsDeleted function as the only trigger for cache updates? I...

https://github.com/dtm-labs/rockscache/blob/main/batch.go#L44 ` defer func() { if r := recover(); r != nil { debug.PrintStack() } }()` 当fn发生panic,这个地方虽然recover了,但没有释放锁,其他等锁的请求会被阻塞直到锁过期 另外这个debug.PrintStack()也不太友好,没办法把context里的额外信息打印出来,不好捞panic日志,是否可以考虑让业务方自己提供panic handler

现在最新的release是v0.1.1,但主分支后续又合并了一些很有用的优化(例如:[PR: Support EVALSHA](https://github.com/dtm-labs/rockscache/pull/21)),希望可以发布一个新的版本

# Bug Report: Incorrect Lock Condition **Date**: 2025-08-07 **Title**: Incorrect lock condition: should be `== locked`, not `!= locked` ## 🐞 Description There appears to be a logic bug in...