AlbumenJ commented on code in PR #10338:
URL: https://github.com/apache/dubbo/pull/10338#discussion_r930813598
##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/AbstractServiceNameMapping.java:
##########
@@ -60,7 +62,13 @@ public abstract class AbstractServiceNameMapping implements
ServiceNameMapping,
public AbstractServiceNameMapping(ApplicationModel applicationModel) {
this.applicationModel = applicationModel;
- this.mappingCacheManager = new MappingCacheManager("",
+ boolean fileCache = true;
+ Optional<ApplicationConfig> application =
applicationModel.getApplicationConfigManager().getApplication();
+ if(application.isPresent()) {
+ fileCache =
Boolean.TRUE.equals(application.get().getEnableFileCache()) ? true : false;
Review Comment:
replaced with `Boolean.parseBoolean`
##########
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MappingCacheManager.java:
##########
@@ -36,7 +36,7 @@ public static MappingCacheManager getInstance(ScopeModel
scopeModel) {
return
scopeModel.getBeanFactory().getOrRegisterBean(MappingCacheManager.class);
}
- public MappingCacheManager(String name, ScheduledExecutorService
executorService) {
+ public MappingCacheManager(boolean fileCache, String name,
ScheduledExecutorService executorService) {
Review Comment:
rename `fileCache` field to `enableFileCached`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]