mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(cloudcommon): add rolecache
rolecache 在原有cache的基础上,使用了 watch 的功能,所以数据的过期时间可以调的高一些,这里使用 roleCacheExpireHours 进行控制,默认设置为24小时。
This commit is contained in:
@@ -63,6 +63,11 @@ func StartService() {
|
||||
log.Logger().Panic(err.Error())
|
||||
}
|
||||
|
||||
err = db.RoleCacheManager.StartWatchRoleInKeystone()
|
||||
if err != nil {
|
||||
log.Fatalf("unable to StartWatchRoleInKeystone: %v", err)
|
||||
}
|
||||
|
||||
// init notify service
|
||||
models.NotifyService = rpc.NewSRpcService(opts.SocketFileDir, models.ConfigManager, models.TemplateManager)
|
||||
models.NotifyService.InitAll()
|
||||
|
||||
Reference in New Issue
Block a user