Skip to content

Commit 4451647

Browse files
committed
Cleanup
1 parent ae2e892 commit 4451647

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/Psr6Store.php

+3-13
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,21 @@
1616
use Psr\Cache\CacheItemInterface;
1717
use Psr\Cache\InvalidArgumentException as CacheInvalidArgumentException;
1818
use Symfony\Component\Cache\Adapter\AdapterInterface;
19-
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
2019
use Symfony\Component\Cache\Adapter\FilesystemTagAwareAdapter;
21-
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
2220
use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
2321
use Symfony\Component\Cache\PruneableInterface;
2422
use Symfony\Component\HttpFoundation\BinaryFileResponse;
2523
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
2624
use Symfony\Component\HttpFoundation\File\File;
2725
use Symfony\Component\HttpFoundation\Request;
2826
use Symfony\Component\HttpFoundation\Response;
29-
use Symfony\Component\Lock\BlockingStoreInterface;
3027
use Symfony\Component\Lock\Exception\InvalidArgumentException as LockInvalidArgumentException;
3128
use Symfony\Component\Lock\Exception\LockReleasingException;
3229
use Symfony\Component\Lock\LockFactory;
3330
use Symfony\Component\Lock\LockInterface;
31+
use Symfony\Component\Lock\PersistingStoreInterface;
3432
use Symfony\Component\Lock\Store\FlockStore;
3533
use Symfony\Component\Lock\Store\SemaphoreStore;
36-
use Symfony\Component\Lock\PersistingStoreInterface;
3734
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
3835
use Symfony\Component\OptionsResolver\Options;
3936
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -96,14 +93,7 @@ public function __construct(array $options = [])
9693
throw new MissingOptionsException('The cache_directory option is required unless you set the cache explicitly');
9794
}
9895

99-
// As of Symfony 4.3+ we can use the optimized FilesystemTagAwareAdapter
100-
if (class_exists(FilesystemTagAwareAdapter::class)) {
101-
return new FilesystemTagAwareAdapter('', 0, $options['cache_directory']);
102-
}
103-
104-
return new TagAwareAdapter(
105-
new FilesystemAdapter('', 0, $options['cache_directory'])
106-
);
96+
return new FilesystemTagAwareAdapter('', 0, $options['cache_directory']);
10797
})->setAllowedTypes('cache', AdapterInterface::class);
10898

10999
$resolver->setDefault('lock_factory', function (Options $options) {
@@ -391,7 +381,7 @@ public function clear(): void
391381
$lock->release();
392382
}
393383
}
394-
384+
395385
public function getCacheKey(Request $request): string
396386
{
397387
// Strip scheme to treat https and http the same

0 commit comments

Comments
 (0)