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
Caching access token #2
Comments
I did try to use the "singleton" lifecycle for the wagon to at least reuse the client instance, but ran into issues. A cache is doable, but I think I would need to a cache that maps the repo "url" to the token for it. |
Maybe cache the token and its timestamp in system properties named "aws-code-wgn-XXXXXX-token" and "aws-code-wgn-XXXXXX-timestamp" where XXXXXX is the repo id or a hash of the URL. Consider using the actual http URL configured in settings.xml -- it needn't be dynamic. |
What do you mean the actual http URL configured in settings.xml? The http url is determined dynamically using the AWS SDK. |
The URL is available from the AWS SDK and the web console, but it is static and follows a fixed pattern -- something like |
This is a great little piece of code, but it connects to AWS twice for each Maven request, including metadata requests. Have you considered caching the access token and an expiration timestamp, say in a system property (one access per 'mvn' process)?
The text was updated successfully, but these errors were encountered: