We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9077c4 commit c53a915Copy full SHA for c53a915
FlagsmithClient/src/main/java/com/flagsmith/Flagsmith.kt
@@ -15,6 +15,7 @@ import com.flagsmith.internal.FlagsmithRetrofitService
15
import com.flagsmith.internal.enqueueWithResult
16
import kotlinx.coroutines.flow.MutableStateFlow
17
import okhttp3.Cache
18
+import java.io.IOException
19
20
/**
21
* Flagsmith
@@ -175,7 +176,11 @@ class Flagsmith constructor(
175
176
.also { lastUsedIdentity = identity }
177
178
fun clearCache() {
- cache?.evictAll()
179
+ try {
180
+ cache?.evictAll()
181
+ } catch (e: IOException) {
182
+ Log.e("Flagsmith", "Error clearing cache", e)
183
+ }
184
}
185
186
private fun getFeatureFlag(
0 commit comments