File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
AndroidSDKCore/src/main/java/com/leanplum Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -2142,4 +2142,13 @@ private static void parseVariantDebugInfo(JSONObject response) {
21422142 VarCache .setVariantDebugInfo (variantDebugInfo );
21432143 }
21442144 }
2145+
2146+ /**
2147+ * Clears cached values for messages, variables and test assignments.
2148+ * Use sparingly as if the app is updated, you'll have to deal with potentially
2149+ * inconsistent state or user experience.
2150+ */
2151+ public static void clearUserContent () {
2152+ VarCache .clearUserContent ();
2153+ }
21452154}
Original file line number Diff line number Diff line change @@ -901,6 +901,22 @@ public static void saveUserAttributes() {
901901 SharedPreferencesUtil .commitChanges (editor );
902902 }
903903
904+ public static void clearUserContent () {
905+ vars .clear ();
906+ variants .clear ();
907+ variantDebugInfo .clear ();
908+
909+ diffs .clear ();
910+ messageDiffs .clear ();
911+ messages = null ;
912+ userAttributes = null ;
913+ merged = null ;
914+
915+ devModeValuesFromServer = null ;
916+ devModeFileAttributesFromServer = null ;
917+ devModeActionDefinitionsFromServer = null ;
918+ }
919+
904920 /**
905921 * Resets the VarCache to stock state.
906922 */
You can’t perform that action at this time.
0 commit comments