DepcalcCacheFactory.php in Dependency Calculation 8
File
src/Cache/DepcalcCacheFactory.php
View source
<?php
namespace Drupal\depcalc\Cache;
use Drupal\Core\Cache\CacheFactoryInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class DepcalcCacheFactory implements CacheFactoryInterface {
protected $factory;
protected $dispatcher;
public function __construct(CacheFactoryInterface $factory, EventDispatcherInterface $dispatcher) {
$this->factory = $factory;
$this->dispatcher = $dispatcher;
}
public function get($bin) {
$backend = $this->factory
->get('depcalc');
return new DepcalcCacheBackend($backend, $this->dispatcher);
}
}