Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for commonClampToInt (0.07 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CacheControl.kt

            this.maxAgeSeconds = maxAgeSeconds.commonClampToInt()
          }
    
        fun maxStale(maxStale: Duration) =
          apply {
            val maxStaleSeconds = maxStale.inWholeSeconds
            require(maxStaleSeconds >= 0) { "maxStale < 0: $maxStaleSeconds" }
            this.maxStaleSeconds = maxStaleSeconds.commonClampToInt()
          }
    
        fun minFresh(minFresh: Duration) =
          apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-CacheControlCommon.kt

            if (immutable) append("immutable, ")
            if (isEmpty()) return ""
            deleteRange(length - 2, length)
          }
        headerValue = result
      }
      return result
    }
    
    internal fun Long.commonClampToInt(): Int =
      when {
        this > Int.MAX_VALUE -> Int.MAX_VALUE
        else -> toInt()
      }
    
    internal fun CacheControl.Companion.commonForceNetwork() =
      CacheControl
        .Builder()
        .noCache()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.2K bytes
    - Viewed (0)
Back to top