Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for refresh (0.34 sec)

  1. docs/features/caching.md

    ```kotlin
    cache.evictAll()
    ```
    
    Removing individual items can be done using the urls iterator.
    This would be typical after a user initiates a force refresh by a pull to refresh type action.
    
    ```java
        val urlIterator = cache.urls()
        while (urlIterator.hasNext()) {
          if (urlIterator.next().startsWith("https://www.google.com/")) {
            urlIterator.remove()
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  2. native-image-tests/src/main/kotlin/okhttp3/GenerateClassList.kt

        "okhttp3.osgi.OsgiTest",
        // Hanging.
        "okhttp3.CookiesTest",
        // Hanging.
        "okhttp3.WholeOperationTimeoutTest",
      )
    
    /**
     * Run periodically to refresh the known set of working tests.
     *
     * TODO use filtering to allow skipping acceptable problem tests
     */
    fun main() {
      val knownTestFile = File("native-image-tests/src/main/resources/testlist.txt")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * doesn't cache partial responses.
     *
     * ## Force a Network Response
     *
     * In some situations, such as after a user clicks a 'refresh' button, it may be necessary to skip
     * the cache, and fetch data directly from the server. To force a full refresh, add the `no-cache`
     * directive:
     *
     * ```java
     * Request request = new Request.Builder()
     *     .cacheControl(new CacheControl.Builder().noCache().build())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/osgi/OsgiTest.kt

              LocalIndexedRepo::class.java.getName() +
                "; ${LocalIndexedRepo.PROP_NAME} = '$REPO_NAME'" +
                "; ${LocalIndexedRepo.PROP_LOCAL_DIR} = '$repoDir'",
            )
            refresh()
            prepareWorkspace()
          }
      }
    
      private fun Workspace.prepareWorkspace() {
        val repositoryPlugin = getRepository(REPO_NAME)
    
        // Deploy the bundles in the deployments test directory.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

      internal fun connectFailed(
        client: OkHttpClient,
        failedRoute: Route,
        failure: IOException,
      ) {
        // Tell the proxy selector when we fail to connect on a fresh connection.
        if (failedRoute.proxy.type() != Proxy.Type.DIRECT) {
          val address = failedRoute.address
          address.proxySelector.connectFailed(
            address.url.toUri(),
            failedRoute.proxy.address(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        // Check that a fresh connection was created, either immediately or after attempting reuse.
        // We know that a fresh connection was created if the server recorded a request with sequence
        // number 0. Since the client may have attempted to reuse the broken connection just before
        // creating a fresh connection, the server may have recorded 2 requests at this point. The order
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  7. docs/features/calls.md

    Some requests will have a cached response. When this cached response isn’t fresh, OkHttp can do a _conditional GET_ to download an updated response if it’s newer than what’s cached. This requires headers like `If-Modified-Since` and `If-None-Match` to be added.
    
    ## Rewriting Responses
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

          this.maxStaleSeconds = maxStaleSecondsLong.commonClampToInt()
        }
    
        /**
         * Sets the minimum number of seconds that a response will continue to be fresh for. If the
         * response will be stale when [minFresh] have elapsed, the cached response will not be used and
         * a network request will be made.
         *
    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)
  9. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // Stalling the socket will cause TWO requests to time out!
        server.enqueue(MockResponse(socketPolicy = StallSocketAtStart))
    
        // The 3rd request should be sent to a fresh connection.
        server.enqueue(
          MockResponse(body = "fresh connection"),
        )
    
        // The first call times out.
        val call1 = client.newCall(Request(server.url("/")))
        assertFailsWith<IOException> {
          call1.execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

         * @param host an IP address or hostname.
         * @param port the IP port associated with the service.
         * @param maxAge time in seconds that this alternative is considered fresh.
         */
        fun alternateService(
          streamId: Int,
          origin: String,
          protocol: ByteString,
          host: String,
          port: Int,
          maxAge: Long,
        )
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
Back to top