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

Add Cache #6655

Merged
merged 2 commits into from
Feb 14, 2023
Merged

Add Cache #6655

merged 2 commits into from
Feb 14, 2023

Conversation

wmontwe
Copy link
Member

@wmontwe wmontwe commented Feb 10, 2023

For the contact refactoring, I need to use a different cache and extracted a general purpose solution. It provides a InMemoryCache, ExpiringCache and SynchronizedCache to fit several needs.

@wmontwe wmontwe requested a review from cketti February 10, 2023 13:00
Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

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

Since these tests are only running on the JVM we can use spaces in method names for better readability.

For assertions newer code typically uses Truth (e.g. assertThat(…).isEqualTo(…)).

@wmontwe
Copy link
Member Author

wmontwe commented Feb 13, 2023

assertThat

Even if Truth works with Kotlin, it is not optimized for Kotlin. What about selecting a Kotlin assertion library that also has support for Kotlin Multiplatform?

This could help to select one:

Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

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

Aside from the duplicate test LGTM 👍

app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt Outdated Show resolved Hide resolved
@wmontwe wmontwe merged commit 90539b5 into main Feb 14, 2023
@wmontwe wmontwe deleted the add_cache branch February 14, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants