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);
        }
    }
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);
        }
    }
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 ) ; } }
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
Returns the best caching strategy given the number of unique shared strings and the amount of memory available .