Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. okhttp/src/main/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 {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  2. okhttp/src/main/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 {
      return when {
        this > Int.MAX_VALUE -> Int.MAX_VALUE
        else -> toInt()
      }
    }
    
    internal fun CacheControl.Companion.commonForceNetwork() =
      CacheControl.Builder()
        .noCache()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top