Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for CacheSize (0.14 sec)

  1. 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)
  2. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  3. 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)
  4. 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)
  5. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
Back to top