|
22 | 22 | use Geocoder\Plugin\Plugin\LocalePlugin;
|
23 | 23 | use Geocoder\Plugin\Plugin\LoggerPlugin;
|
24 | 24 | use Geocoder\Plugin\PluginProvider;
|
25 |
| -use Geocoder\Provider\Cache\ProviderCache; |
26 | 25 | use Symfony\Component\Config\Definition\Processor;
|
27 | 26 | use Symfony\Component\Config\FileLocator;
|
28 | 27 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
@@ -154,39 +153,6 @@ public function configureProviderPlugins(ContainerBuilder $container, array $con
|
154 | 153 | }, $plugins);
|
155 | 154 | }
|
156 | 155 |
|
157 |
| - /** |
158 |
| - * Add cache to a provider if needed. |
159 |
| - * |
160 |
| - * @param ContainerBuilder $ |
161 |
| - * @param string $serviceId |
162 |
| - * @param array $providerConfig |
163 |
| - */ |
164 |
| - private function configureCache(ContainerBuilder $container, string $serviceId, array $providerConfig) |
165 |
| - { |
166 |
| - if (null === $providerConfig['cache'] && null === $providerConfig['cache_lifetime']) { |
167 |
| - return; |
168 |
| - } |
169 |
| - |
170 |
| - if (!class_exists(ProviderCache::class)) { |
171 |
| - throw new \LogicException('You must install "geocoder-php/cache-provider" to use cache.'); |
172 |
| - } |
173 |
| - |
174 |
| - if (null === $cacheServiceId = $providerConfig['cache']) { |
175 |
| - if (!$container->has('app.cache')) { |
176 |
| - throw new \LogicException('You need to specify a service for cache.'); |
177 |
| - } |
178 |
| - $cacheServiceId = 'app.cache'; |
179 |
| - } |
180 |
| - |
181 |
| - $container->register($serviceId.'.cache', ProviderCache::class) |
182 |
| - ->setDecoratedService($serviceId) |
183 |
| - ->setArguments([ |
184 |
| - new Reference($serviceId.'.cache.inner'), |
185 |
| - new Reference($cacheServiceId), |
186 |
| - $providerConfig['cache_lifetime'], |
187 |
| - ]); |
188 |
| - } |
189 |
| - |
190 | 156 | /**
|
191 | 157 | * {@inheritdoc}
|
192 | 158 | */
|
|
0 commit comments