Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for CacheSize (0.18 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java

    import okhttp3.Response;
    
    public final class CacheResponse {
      private final OkHttpClient client;
    
      public CacheResponse(File cacheDirectory) throws Exception {
        int cacheSize = 10 * 1024 * 1024; // 10 MiB
        Cache cache = new Cache(cacheDirectory, cacheSize);
    
        client = new OkHttpClient.Builder()
            .cache(cache)
            .build();
      }
    
      public void run() throws Exception {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      uint64 start = Env::Default()->NowSeconds();
      do {
        Env::Default()->SleepForMicroseconds(100000);
      } while (cache.CacheSize() == 24 && Env::Default()->NowSeconds() - start < 3);
      // There should be one block left in the cache, and it should be the first
      // block of "b".
      EXPECT_EQ(cache.CacheSize(), 8);
      TF_EXPECT_OK(ReadCache(&cache, "b", 0, 1, &out));
      EXPECT_EQ(calls, 3);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        server.enqueue(MockResponse(body = "abc"))
    
        val ctxt = InstrumentationRegistry.getInstrumentation().targetContext.applicationContext
    
        val cacheSize = 1L * 1024 * 1024 // 1MB
        val cache = Cache(ctxt.cacheDir.resolve("testCache"), cacheSize)
    
        try {
          client =
            client.newBuilder()
              .cache(cache)
              .build()
    
          val request =
            Request.Builder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

        RemoveFile_Locked(filename);
        it->second = file_signature;
        return false;
      }
      file_signature_map_[filename] = file_signature;
      return true;
    }
    
    size_t RamFileBlockCache::CacheSize() const {
      absl::MutexLock lock(&mu_);
      return cache_size_;
    }
    
    void RamFileBlockCache::Prune() {
      while (!stop_pruning_thread_.WaitForNotificationWithTimeout(
          absl::Microseconds(1000000))) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

      size_t block_size() const { return block_size_; }
      size_t max_bytes() const { return max_bytes_; }
      uint64_t max_staleness() const { return max_staleness_; }
    
      /// The current size (in bytes) of the cache.
      size_t CacheSize() const ABSL_LOCKS_EXCLUDED(mu_);
    
      // Returns true if the cache is enabled. If false, the BlockFetcher callback
      // is always executed during Read.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
  6. docs/recipes.md

    === ":material-language-java: Java"
        ```java
          private final OkHttpClient client;
    
          public CacheResponse(File cacheDirectory) throws Exception {
            int cacheSize = 10 * 1024 * 1024; // 10 MiB
            Cache cache = new Cache(cacheDirectory, cacheSize);
    
            client = new OkHttpClient.Builder()
                .cache(cache)
                .build();
          }
    
          public void run() throws Exception {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

     *
     * ```java
     * // The singleton HTTP client.
     * public final OkHttpClient client = new OkHttpClient.Builder()
     *     .addInterceptor(new HttpLoggingInterceptor())
     *     .cache(new Cache(cacheDir, cacheSize))
     *     .build();
     * ```
     *
     * ## Customize Your Client With newBuilder()
     *
     * You can customize a shared OkHttpClient instance with [newBuilder]. This builds a client that
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  8. CHANGELOG/CHANGELOG-1.18.md

       1. Currently, if users were to explicitly specify CacheSize of 0 for KMS provider, they would end-up with a provider that caches up to 1000 keys. This PR changes this behavior.
          Post this PR, when users supply 0 for CacheSize this will result in a validation error.
    Plain Text
    - Registered: Fri Apr 26 09:05:10 GMT 2024
    - Last Modified: Wed Jun 16 17:18:28 GMT 2021
    - 373.2K bytes
    - Viewed (0)
  9. CHANGELOG/CHANGELOG-1.27.md

      The type checking is fully informational, and the behavior of the policy is unchanged. ([#115668](https://github.com/kubernetes/kubernetes/pull/115668), [@jiahuif](https://github.com/jiahuif))
    - `cacheSize` field in `EncryptionConfiguration` is not supported for KMSv2 provider ([#113121](https://github.com/kubernetes/kubernetes/pull/113121), [@aramase](https://github.com/aramase))
    Plain Text
    - Registered: Fri Apr 26 09:05:10 GMT 2024
    - Last Modified: Tue Apr 16 15:20:21 GMT 2024
    - 434.3K bytes
    - Viewed (1)
Back to top