original_string: public function getBestCachingStrategy($sharedStringsUniqueCount, $tempFolder = null)
      {
          if ($this->isInMemoryStrategyUsageSafe($sharedStringsUniqueCount)) {
              return new InMemoryStrategy($sharedStringsUniqueCount);
          } else {
              return new FileBasedStrategy($tempFolder, self::MAX_NUM_STRINGS_PER_TEMP_FILE);
          }
      }
code: public function getBestCachingStrategy($sharedStringsUniqueCount, $tempFolder = null)
      {
          if ($this->isInMemoryStrategyUsageSafe($sharedStringsUniqueCount)) {
              return new InMemoryStrategy($sharedStringsUniqueCount);
          } else {
              return new FileBasedStrategy($tempFolder, self::MAX_NUM_STRINGS_PER_TEMP_FILE);
          }
      }
code_tokens: public function getBestCachingStrategy ( $ sharedStringsUniqueCount , $ tempFolder = null ) { if ( $ this -> isInMemoryStrategyUsageSafe ( $ sharedStringsUniqueCount ) ) { return new InMemoryStrategy ( $ sharedStringsUniqueCount ) ; } else { return new FileBasedStrategy ( $ tempFolder , self :: MAX_NUM_STRINGS_PER_TEMP_FILE ) ; } }
docstring: Returns the best caching strategy, given the number of unique shared strings
  and the amount of memory available.
  
  @param int|null $sharedStringsUniqueCount Number of unique shared strings (NULL if unknown)
  @param string|void $tempFolder Temporary folder where the temporary files to store shared strings will be stored
  @return CachingStrategyInterface The best caching strategy
docstring_tokens: Returns the best caching strategy given the number of unique shared strings and the amount of memory available .