@@ -222,6 +222,42 @@ interface Qonversion {
222222 */
223223 fun remoteConfigList (callback : QonversionRemoteConfigListCallback )
224224
225+ /* *
226+ * Invalidates the in-memory cache of remote configs so the next
227+ * [remoteConfig] or [remoteConfigList] call fetches a fresh targeting
228+ * evaluation from the server instead of returning the cached copy.
229+ *
230+ * This method performs no network request itself and has no callback —
231+ * it only marks the cached values as stale. A [remoteConfig] load that is
232+ * already in flight when this method is called is re-issued once, so its
233+ * waiting callbacks receive a fresh evaluation rather than the superseded
234+ * one (if the re-issued request fails, the superseded evaluation is
235+ * delivered instead); an in-flight [remoteConfigList] load completes with
236+ * the evaluation it started with, and any subsequent call fetches fresh
237+ * values.
238+ *
239+ * Call it when the targeting inputs changed and you need the change
240+ * reflected immediately, for example:
241+ * - after setting a batch of user properties via [setUserProperty] or
242+ * [setCustomUserProperty] that your remote config targeting depends on;
243+ * - on returning to the foreground in long-living sessions, if the
244+ * targeting could have changed server-side.
245+ *
246+ * You do NOT need to call it after [identify] — the SDK invalidates the
247+ * cache on identity changes automatically. You also do not need it to
248+ * recover from a locally bundled fallback config — fallbacks are never
249+ * cached, so the next call retries the network automatically. The screens
250+ * shown by No-Code products are not affected by this method.
251+ *
252+ * Call it from the same thread you use for the other Qonversion calls
253+ * (typically the main thread). On Android this method is also safe to
254+ * call from any thread.
255+ *
256+ * @see remoteConfig
257+ * @see remoteConfigList
258+ */
259+ fun invalidateRemoteConfigsCache ()
260+
225261 /* *
226262 * This function should be used for the test purposes only. Do not forget to delete the usage of this function before the release.
227263 * Use this function to attach the user to the experiment.
@@ -329,15 +365,23 @@ interface Qonversion {
329365 * Sets Qonversion reserved user properties, like email or user id.
330366 * Note that using [QUserPropertyKey.Custom] here will do nothing.
331367 * To set custom user property, use [setCustomUserProperty] method instead.
368+ * If your remote config targeting depends on this property and you need
369+ * the updated evaluation immediately, call [invalidateRemoteConfigsCache]
370+ * after setting the properties.
332371 * @param key defined enum key that will be transformed to string
333372 * @param value property value
373+ * @see invalidateRemoteConfigsCache
334374 */
335375 fun setUserProperty (key : QUserPropertyKey , value : String )
336376
337377 /* *
338- * Sets custom user property
378+ * Sets custom user property.
379+ * If your remote config targeting depends on this property and you need
380+ * the updated evaluation immediately, call [invalidateRemoteConfigsCache]
381+ * after setting the properties.
339382 * @param key custom user property key
340383 * @param value property value
384+ * @see invalidateRemoteConfigsCache
341385 */
342386 fun setCustomUserProperty (key : String , value : String )
343387
0 commit comments