-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
baseCache.close(); | ||
applicationCache.close(); | ||
// Ensures that only one Cache is initialized if using the same directory. | ||
if (Files.isSameFile(baseCacheDirectory, applicationCacheDirectory)) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
Fixes #29