[ https://issues.apache.org/jira/browse/MBUILDCACHE-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708758#comment-17708758 ]
ASF GitHub Bot commented on MBUILDCACHE-48: ------------------------------------------- eltsovalex commented on PR #51: URL: https://github.com/apache/maven-build-cache-extension/pull/51#issuecomment-1497146448 > Hi Alex. Regarding the code itself - looks good to me. But please clarify the use case and rationale for the change. Is it for cases where the local build is faster than downloading from the cache? I understand uploading might be expensive, but an existing configuration parameter allows for skipping the upload. And if uploading doesn't happen, I wonder what the benefits are achieved by disabling the cache compared to disabled upload. Thank you! Hi. Thanks for asking. Sorry for not providing a precise description of my use-case. So, I have a module in my project that builds a huge EAR of ~200Mb as a target. Due to some specific reasons (e.g. project version written deep down in one of jars inside EAR +some build artifacts required for publishing by CI to be present in target folder) I have to always build that subproject clean (so without caching). And while the previous flag I added last year (maven.build.cache.skipCache) works fine to solve the forced rebuild task - it still uploads the 200Mb EAR to cache. So it spoils the cache with multiple versions of a huge unused file + takes some time for the upload itself. As this is not an attached artefact, but a main goal - I can not add it to ignored/not uploaded. Hence this new property added that totally disables cache on a per-project level (both lookup and upload) > Add ability to disable caching on a per-module level > ---------------------------------------------------- > > Key: MBUILDCACHE-48 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-48 > Project: Maven Build Cache Extension > Issue Type: New Feature > Components: remote build cache > Affects Versions: 1.0.0 > Reporter: Alexander Eltsov > Priority: Major > Labels: pull-request-available > > Add ability to do the caching on a per-module level. > This may be required in a case when a module is a final leaf of a reactor > tree, and its artefacts are not required by other modules as cached > dependencies. Hence eliminating some modules from caching will speed up build > and also lower the footprint size of a cached build. > > E.g. in my project (where we have huge deployment artifacts in some of > modules) we reduced the cache footprint from 1.5G to 100M by introducing such > a capability -- This message was sent by Atlassian Jira (v8.20.10#820010)