diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index cc7488af..80ed704b 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -2,6 +2,7 @@ namespace LaravelDoctrine\ORM; +use Doctrine\Common\Cache\ArrayCache; use Doctrine\Common\Cache\Cache; use Doctrine\ORM\Cache\DefaultCacheFactory; use Doctrine\ORM\Configuration; @@ -92,9 +93,12 @@ public function __construct( */ public function create(array $settings = []) { + $defaultDriver = $this->config->get('doctrine.cache.default', 'array'); + $configuration = $this->setup->createConfiguration( array_get($settings, 'dev', false), - array_get($settings, 'proxies.path') + array_get($settings, 'proxies.path'), + $this->cache->driver($defaultDriver) ); $this->setMetadataDriver($settings, $configuration);