Skip to content

Commit 9840551

Browse files
committed
Merge pull request #38 from Nyholm/cleanup
Clean up and minor fixes
2 parents 3fdb646 + 36c27d7 commit 9840551

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ php app/console cache:flush doctrine
196196
197197
echo "Or you could run:"
198198
php app/console cache:flush all
199+
200+
echo "Run the following command to see all your options:"
201+
php app/console cache:flush help
199202
```
200203

201204
*Caution: If you are using a implementation that does not support tagging you will clear all with any of the above commands.*

src/Cache/LoggingCachePool.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Cache\CacheBundle\Cache;
1313

14-
use Monolog\Logger;
1514
use Psr\Log\LoggerInterface;
1615

1716
/**
@@ -22,7 +21,7 @@
2221
class LoggingCachePool extends RecordingCachePool
2322
{
2423
/**
25-
* @type Logger
24+
* @type LoggerInterface
2625
*/
2726
private $logger;
2827

src/DependencyInjection/CacheExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function load(array $configs, ContainerBuilder $container)
8989
->setDecoratedService('router', null, 10)
9090
->addArgument(new Reference($config['router']['service_id']))
9191
->addArgument(new Reference('cache.service.router.inner'))
92-
->addArgument($config['router']['ttl']);
92+
->addArgument($config['router']);
9393
}
9494

9595
if ($container->getParameter('kernel.debug')) {

src/DependencyInjection/Compiler/DoctrineCompilerPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Cache\CacheBundle\DependencyInjection\Compiler;
1313

14-
use Cache\CacheBundle\Cache\FixedTaggingCachePool;
14+
use Cache\Bridge\DoctrineCacheBridge;
1515
use Cache\CacheBundle\Factory\DoctrineBridgeFactory;
1616
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
1717
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
@@ -73,7 +73,7 @@ protected function enableDoctrineSupport(array $config)
7373

7474
// Doctrine can't talk to a PSR-6 cache, so we need a bridge
7575
$bridgeServiceId = sprintf('cache.service.doctrine.%s.%s.bridge', $cacheType, $type);
76-
$this->container->register($bridgeServiceId, FixedTaggingCachePool::class)
76+
$this->container->register($bridgeServiceId, DoctrineCacheBridge::class)
7777
->setPublic(false)
7878
->setFactory([DoctrineBridgeFactory::class, 'get'])
7979
->addArgument(new Reference($typeConfig['service_id']))

src/Routing/CachingRouter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ class CachingRouter implements RouterInterface
3939
/**
4040
* @param CacheItemPoolInterface $cache
4141
* @param RouterInterface $router
42-
* @param $ttl
42+
* @param array $config
4343
*/
44-
public function __construct(CacheItemPoolInterface $cache, RouterInterface $router, $ttl)
44+
public function __construct(CacheItemPoolInterface $cache, RouterInterface $router, array $config)
4545
{
4646
$this->cache = $cache;
47-
$this->ttl = $ttl;
47+
$this->ttl = $config['ttl'];
4848
$this->router = $router;
4949
}
5050

0 commit comments

Comments
 (0)