-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Android 9 (API 28) compatibility #293
Comments
True, it is lightly touched on in the Guava compatibility, although the reason has changed now. It is not a goal of this project to run on Android. However, I think we could provide graceful fallback such as to |
Thanks, that sounds like a good plan. Android does support Java 8, and indeed is running on OpenJDK 8, so perhaps you should revise the rationale there. Caffeine currently works fine on Android API 24-27, but not 28. |
This change adds DoH-compliant caching and TTL rewriting. It uses Caffeine, a cache framework that supports custom expiration times for each entry and load coalescing, so that a query can be fulfilled from cache if a load action is in progress for that query. Caching is disabled by default, subject to a Firebase remote configuration experiment. NOTE: Currently this change is blocked by a compatibility bug in Caffeine: ben-manes/caffeine#293 Fixes #90
Closing because neither of us originally considered the DEX issue. Since we codegen to reduce memory footprint, that's good for servers and more troublesome for Android. Users would have to use Proguard and know which classes to keep, which is flaky and annoying. I think Android requires so many different design considerations that Caffeine will never be a good fit. Another library or your custom implementation seems to make a lot more sense. |
Caffeine cannot be used as the default due to it not supporting Android (ben-manes/caffeine#293).
Caffeine currently cannot be used in apps that target Android 9 (API 28), because Android 9 blocks access to
threadLocalRandomProbe
as part of the restrictions on non-SDK interfaces.For more details see micronaut-projects/micronaut-core#124 (comment)
The text was updated successfully, but these errors were encountered: