-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问如何缓存key支持多租户 #141
Comments
不支持,也没有尝试过。 试试 r.Interceptors 处理?参考下源代码 |
谢谢提供思路,我看了Interceptors相关的,这样写拦截key动态修改。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
是否可以在设置缓存和获取缓存时,动态修改key,类似拦截器
当前请求header的tenant-id=1
var r = new RedisClient("127.0.0.1");
r.handlerKey+= (key) =>
{
return tenant-id+":"+key
};
例如, redis.set("list","aaa")
拦截key="list",修改为key="1:list"
The text was updated successfully, but these errors were encountered: