-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[feat] Add cacheEnabled
prop
#152
Conversation
enableCache
propenableCache
prop
…th` & `setAppCacheEnabled`
enableCache
propenableCache
prop
Updated - this should be good to go now, cc @Titozzz @jamonholmgren |
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
Show resolved
Hide resolved
Hey there! Thanks for your work! Is there anything stopping this PR from getting merged (besides the conflicts now)? |
Yeah, it needs testing, because when I tested it I did not feel the expected improvements |
@Salakar Can you resolve the conflicts on this? |
Any updates on this one ? |
@munsifhayat did you test this PR works for you ? |
|
Keep me updated |
For my project I can confirm that this PR improves the caching and performance. Thanks for this PR. I think this is a great and important improvement. 👍 @Salakar @munsifhayat @Titozzz But unfortunately, in the Without this _enableCache is always false in I would also recommend to rename |
@jerolimov excellent catch about the props naming. We need to do that. 👍 |
@Salakar @jerolimov I updated the PR according to the reviews above :) |
LGTM 👌 |
Let's ship it! |
@Titozzz Sorry for the delay. Thanks for applying the feedback. Sourcecode looks fine. I tested it also in a live project on iOS and it works as expected. 👍 (I could not verify this on Android yet, because I have other troubles with my Android build atm.) |
@jerolimov Imported the Webivew as required and than : Rest are working fine but 'cacheEnable' could be verified once I have live build Soon. Let me know if anything need to change. "react-native-webview": "git+https://github.com/react-native-community/react-native-webview.git" |
@munsifhayat With your linked version, you referes to the latest react-native-webview. This version does not include the cacheEnabled prop until this PR got merged. You need to refer the branch which is requested to merge here. You can define this in your package.json this way:
I install this with yarn (npm install should work similar):
You find the username and branch of the PR in the top-right corner of the PR: Hope this helps. |
Its working perfectly fine. |
# [4.0.0](v3.2.2...v4.0.0) (2019-01-30) ### Features * **iOS/Android:** Add `cacheEnabled` prop ([#152](#152)) ([83ce79f](83ce79f)) ### BREAKING CHANGES * **iOS/Android:** This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I think this |
Added a new cacheEnabled prop to toggle Android & iOS webview caching behavior. BREAKING CHANGE: This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.
# [4.0.0](react-native-webview/react-native-webview@v3.2.2...v4.0.0) (2019-01-30) ### Features * **iOS/Android:** Add `cacheEnabled` prop ([react-native-webview#152](react-native-webview#152)) ([83ce79f](react-native-webview@83ce79f)) ### BREAKING CHANGES * **iOS/Android:** This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.
# [4.0.0](react-native-webview/react-native-webview@v3.2.2...v4.0.0) (2019-01-30) ### Features * **iOS/Android:** Add `cacheEnabled` prop ([#152](react-native-webview/react-native-webview#152)) ([83ce79f](react-native-webview/react-native-webview@83ce79f)) ### BREAKING CHANGES * **iOS/Android:** This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.
This PR 'fixes' #128
cc @Titozzz @jamonholmgren as per linked issue above. Let me know your thoughts and if anything needs changing. I've enabled it by default as discussed with @Titozzz on slack.
Checklist
Release Notes
enableCache
cacheEnabled
prop to toggle Android & iOS webview caching behavior. This change makes caching enabled by default when previously there was no caching behavior which may cause unexpected behaviour changes in your existing implementations.