-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
A question for ReferenceConfigCache. #1293
Comments
Thanks for your advice, actually Anyway, the current official implementation do need improvement, we'll discuss improve it or not and how to improve it. Welcome create a PR if you have any good ideas. |
Thanks for your reply, I understand what you mean. |
It's not a good way to provide Defer it firstly until we reach a reasonable approach. |
In my project, this method
|
官网的例子通过ReferenceConfigCache缓存ReferenceConfig实例,
源码中cache.get()的实现是先get, 如果== null 再put ReferenceConfig实例, 而没有提供可以由用户判断cache是否已存在的api, 我在通过groovy脚本泛化调用的时候, 需要设定当前应用与注册中心, 然后获取ReferenceConfig实例, 如下:
每一次都会把这个脚本跑一遍, 也就是每一次都会去new RegistryConfig, 和ApplicationConfig这两个实例, 虽然除了第一次以外, ReferenceConfig都是是从原有的cache中获得; 但是并没有符合这个cache工具类的原有目的. 所以ReferenceConfigCache的get()方法能否提供单独的get()方法;
还是我的使用方式不对?
非常感谢~
The text was updated successfully, but these errors were encountered: