Skip to content

Commit 8eed469

Browse files
authored
[Caching] Drop MemoryCacheStorage, always use FileCacheStorage (#8354)
1 parent 4574023 commit 8eed469

2 files changed

Lines changed: 0 additions & 60 deletions

File tree

‎src/Caching/CacheFactory.php‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Rector\Caching;
66

7-
use OndraM\CiDetector\CiDetector;
87
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
9-
use Rector\Caching\ValueObject\Storage\MemoryCacheStorage;
108
use Rector\Configuration\Option;
119
use Rector\Configuration\Parameter\SimpleParameterProvider;
1210
use Symfony\Component\Filesystem\Filesystem;
@@ -23,12 +21,6 @@ public function __construct(
2321
*/
2422
public function create(): Cache
2523
{
26-
// in CI the workspace is ephemeral and usually starts from scratch,
27-
// so a file cache that is never read again is only wasted IO → use faster in-memory cache
28-
if (new CiDetector()->isCiDetected()) {
29-
return new Cache(new MemoryCacheStorage());
30-
}
31-
3224
$cacheDirectory = SimpleParameterProvider::provideStringParameter(Option::CACHE_DIR);
3325

3426
// ensure cache directory exists

‎src/Caching/ValueObject/Storage/MemoryCacheStorage.php‎

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)