Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for invalidatesCache (0.19 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http/HttpMethod.kt

     */
    package okhttp3.internal.http
    
    import kotlin.jvm.JvmStatic
    
    object HttpMethod {
      @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs.
      fun invalidatesCache(method: String): Boolean =
        (
          method == "POST" || method == "PATCH" || method == "PUT" ||
            method == "DELETE" || method == "MOVE"
        )
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

              if (cacheResponse != null) {
                // This will log a conditional cache miss only.
                listener.cacheMiss(call)
              }
            }
          }
    
          if (HttpMethod.invalidatesCache(networkRequest.method)) {
            try {
              cache.remove(networkRequest)
            } catch (_: IOException) {
              // The cache cannot be written.
            }
          }
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

          return null
        }
    
        return response
      }
    
      internal fun put(response: Response): CacheRequest? {
        val requestMethod = response.request.method
    
        if (HttpMethod.invalidatesCache(response.request.method)) {
          try {
            remove(response.request)
          } catch (_: IOException) {
            // The cache cannot be written.
          }
          return null
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top