|
16 | 16 | use Psr\Cache\CacheItemInterface;
|
17 | 17 | use Psr\Cache\InvalidArgumentException as CacheInvalidArgumentException;
|
18 | 18 | use Symfony\Component\Cache\Adapter\AdapterInterface;
|
19 |
| -use Symfony\Component\Cache\Adapter\FilesystemAdapter; |
20 | 19 | use Symfony\Component\Cache\Adapter\FilesystemTagAwareAdapter;
|
21 |
| -use Symfony\Component\Cache\Adapter\TagAwareAdapter; |
22 | 20 | use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
|
23 | 21 | use Symfony\Component\Cache\PruneableInterface;
|
24 | 22 | use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
25 | 23 | use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
|
26 | 24 | use Symfony\Component\HttpFoundation\File\File;
|
27 | 25 | use Symfony\Component\HttpFoundation\Request;
|
28 | 26 | use Symfony\Component\HttpFoundation\Response;
|
29 |
| -use Symfony\Component\Lock\BlockingStoreInterface; |
30 | 27 | use Symfony\Component\Lock\Exception\InvalidArgumentException as LockInvalidArgumentException;
|
31 | 28 | use Symfony\Component\Lock\Exception\LockReleasingException;
|
32 | 29 | use Symfony\Component\Lock\LockFactory;
|
33 | 30 | use Symfony\Component\Lock\LockInterface;
|
| 31 | +use Symfony\Component\Lock\PersistingStoreInterface; |
34 | 32 | use Symfony\Component\Lock\Store\FlockStore;
|
35 | 33 | use Symfony\Component\Lock\Store\SemaphoreStore;
|
36 |
| -use Symfony\Component\Lock\PersistingStoreInterface; |
37 | 34 | use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
|
38 | 35 | use Symfony\Component\OptionsResolver\Options;
|
39 | 36 | use Symfony\Component\OptionsResolver\OptionsResolver;
|
@@ -96,14 +93,7 @@ public function __construct(array $options = [])
|
96 | 93 | throw new MissingOptionsException('The cache_directory option is required unless you set the cache explicitly');
|
97 | 94 | }
|
98 | 95 |
|
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']); |
107 | 97 | })->setAllowedTypes('cache', AdapterInterface::class);
|
108 | 98 |
|
109 | 99 | $resolver->setDefault('lock_factory', function (Options $options) {
|
@@ -392,9 +382,6 @@ public function clear(): void
|
392 | 382 | }
|
393 | 383 | }
|
394 | 384 |
|
395 |
| - /** |
396 |
| - * @internal Do not use in public code, this is for unit testing purposes only |
397 |
| - */ |
398 | 385 | public function getCacheKey(Request $request): string
|
399 | 386 | {
|
400 | 387 | // Strip scheme to treat https and http the same
|
|
0 commit comments