[GitHub] [maven-mvnd] oehme commented on a diff in pull request #797: Add property to disable model caching

2023-03-02 Thread via GitHub


oehme commented on code in PR #797:
URL: https://github.com/apache/maven-mvnd/pull/797#discussion_r1123498117


##
common/src/main/java/org/mvndaemon/mvnd/common/Environment.java:
##
@@ -163,6 +163,12 @@ public enum Environment {
  * non-native clients and is useful mostly for debugging.
  */
 MVND_NO_DAEMON("mvnd.noDaemon", "MVND_NO_DAEMON", Boolean.FALSE, 
OptionType.BOOLEAN, Flags.DISCRIMINATING),
+
+/**
+ * If true, the daemon will not use its in-memory metadata 
cache and instead re-read the
+ * metadata from the pom.xml files in the local repository. This is mostly 
useful for testing purposes.
+ */
+MVND_NO_MODEL_CACHE("mvnd.noModelCache", null, Boolean.FALSE, 
OptionType.BOOLEAN, Flags.NONE),

Review Comment:
   The `createCache` method is called every build, so it doesn't have to be 
discriminating. It doesn't hurt either, I don't mind :) 



-- 
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: issues-unsubscr...@maven.apache.org

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



[GitHub] [maven-mvnd] oehme commented on a diff in pull request #797: Add property to disable model caching

2023-03-01 Thread via GitHub


oehme commented on code in PR #797:
URL: https://github.com/apache/maven-mvnd/pull/797#discussion_r1122150631


##
daemon/src/main/java/org/apache/maven/project/SnapshotModelCacheFactory.java:
##
@@ -45,6 +45,9 @@ public SnapshotModelCacheFactory(DefaultModelCacheFactory 
factory) {
 
 @Override
 public ModelCache createCache(RepositorySystemSession session) {
-return new SnapshotModelCache(globalCache, 
factory.createCache(session));
+boolean enableModelCache = 
Boolean.parseBoolean(System.getProperty("mvnd.modelCache", "true"));

Review Comment:
   Sure, I'll do that



-- 
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: issues-unsubscr...@maven.apache.org

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