You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/27 09:28:42 UTC

[GitHub] [dubbo] owen200008 commented on a diff in pull request #10338: Cache file add module name

owen200008 commented on code in PR #10338:
URL: https://github.com/apache/dubbo/pull/10338#discussion_r930835612


##########
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:
   application.get().getEnableFileCache() type is Boolean,how to use Boolean.parseBoolean



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org