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

SDKS-3104 - Improvements in caching the key reference #409

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

jeyanthanperiyasamy
Copy link
Contributor

JIRA Ticket

Please link jira ticket here

Description

Briefly describe the change and any information that would help speedup the review and testing.


companion object {
//Hold the current key.
val keyReferenceCache = AtomicReference<SecretKey>()
Copy link
Contributor Author

@jeyanthanperiyasamy jeyanthanperiyasamy Apr 16, 2024

Choose a reason for hiding this comment

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

we are caching the key , once we access the secret reference, so we access the keystore only once


@Throws(GeneralSecurityException::class, IOException::class)
override fun reset() {
keyStore.deleteEntry(keyAlias)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shoud we remove the cache also?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes good point

@jeyanthanperiyasamy jeyanthanperiyasamy force-pushed the SDK-3104 branch 5 times, most recently from f617ca0 to d7991eb Compare April 16, 2024 23:43
witrisna
witrisna previously approved these changes Apr 17, 2024
rodrigoareis
rodrigoareis previously approved these changes Apr 17, 2024
Copy link
Contributor

@rodrigoareis rodrigoareis left a comment

Choose a reason for hiding this comment

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

Changes looks good to me

spetrov
spetrov previously approved these changes Apr 24, 2024
spetrov
spetrov previously approved these changes Apr 24, 2024
@spetrov spetrov merged commit 5a81c56 into develop Apr 24, 2024
0 of 7 checks passed
@spetrov spetrov deleted the SDK-3104 branch April 24, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants