Skip to content

Commit ea1ef4b

Browse files
ivolivol
authored andcommitted
Fix docs to align with input in milliseconds
1 parent 6e1db65 commit ea1ef4b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver
99

1010
### Added
1111
- Thread-safe failure mode caching for the interceptor path. When the platform SDK returns a failure status (`NO_NETWORK`, `POOR_NETWORK`, `MITM_DETECTED`, `NO_APPROOV_SERVICE`), the result is cached for 0.5 seconds. Subsequent requests within that window return the cached failure instantly, avoiding redundant ~1s SDK calls. Success is never cached.
12-
- Added `ApproovService.setFailureCacheTTL()` to customize the caching duration of failure statuses.
12+
- Added `ApproovService.setFailureCacheTtlMs()` to customize the caching duration of failure statuses in milliseconds.
1313
- Added `ApproovService.isInitialized()` to expose the service-layer initialization state.
1414
- Integrated a localized testing framework for comprehensive service layer verification.
1515
- Added extensive test coverage for core service flows, including initialization, token management, and request mutation.

REFERENCE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,17 @@ void setUseApproovStatusIfNoToken(boolean shouldUse)
187187
fun setUseApproovStatusIfNoToken(shouldUse: Boolean)
188188
```
189189

190-
## setFailureCacheTTL
191-
Sets the time-to-live (in seconds) for caching Approov failure statuses (such as `NO_NETWORK`, `MITM_DETECTED`, etc.) during token fetches. The default TTL is 0.5 seconds. When the service is in a sustained failure state, caching the failure avoids redundant and potentially blocking calls to the native SDK for rapidly fired concurrent requests.
190+
## setFailureCacheTtlMs
191+
Sets the time-to-live (in milliseconds) for caching Approov failure statuses (such as `NO_NETWORK`, `MITM_DETECTED`, etc.) during interceptor token fetches. The default TTL is 500 milliseconds. When the service is in a sustained failure state, caching the failure avoids redundant and potentially blocking calls to the native SDK for rapidly fired concurrent requests.
192192

193193
**Java:**
194194
```Java
195-
void setFailureCacheTTL(double ttl)
195+
void setFailureCacheTtlMs(long ttlMs)
196196
```
197197

198198
**Kotlin:**
199199
```kotlin
200-
fun setFailureCacheTTL(ttl: Double)
200+
fun setFailureCacheTtlMs(ttlMs: Long)
201201
```
202202

203203
## setDevKey

0 commit comments

Comments
 (0)