Skip to content
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

Adds useOnlyProjectCache jib-maven-plugin configuration. #134

Merged
merged 14 commits into from
Mar 19, 2018

Conversation

coollog
Copy link
Contributor

@coollog coollog commented Feb 28, 2018

Fixes #29

baseCache.close();
applicationCache.close();
// Ensures that only one Cache is initialized if using the same directory.
if (Files.isSameFile(baseCacheDirectory, applicationCacheDirectory)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, does this need to be syncrhonized or made threadsafe somehow?

Copy link
Contributor Author

@coollog coollog Mar 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, most things the codebase are designed to be thread-local and/or immutable but the CacheMetadata in a Cache is shared between threads. The only method that mutates the CacheMetadata state is CacheMetadata#addLayer, which is synchronized.

@coollog coollog merged commit 9dd6ab5 into master Mar 19, 2018
@coollog coollog deleted the maven-useOnlyProjectCache branch March 19, 2018 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants