Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/Caching/CacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

namespace Rector\Caching;

use OndraM\CiDetector\CiDetector;
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Caching\ValueObject\Storage\MemoryCacheStorage;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
use Symfony\Component\Filesystem\Filesystem;
Expand All @@ -23,12 +21,6 @@ public function __construct(
*/
public function create(): Cache
{
// in CI the workspace is ephemeral and usually starts from scratch,
// so a file cache that is never read again is only wasted IO → use faster in-memory cache
if (new CiDetector()->isCiDetected()) {
return new Cache(new MemoryCacheStorage());
}

$cacheDirectory = SimpleParameterProvider::provideStringParameter(Option::CACHE_DIR);

// ensure cache directory exists
Expand Down
52 changes: 0 additions & 52 deletions src/Caching/ValueObject/Storage/MemoryCacheStorage.php

This file was deleted.

Loading