Skip to content

Commit

Permalink
Easier memcache configuration
Browse files Browse the repository at this point in the history
* Minimum version of kdyby/doctrine-cache upped to 2.1
  • Loading branch information
fprochazka committed Oct 27, 2013
1 parent 009ff40 commit 4ecd9c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"doctrine/orm": "~2.4",
"kdyby/events": "~1.0",
"kdyby/console": "~1.0",
"kdyby/annotations": "~1.0"
"kdyby/annotations": "~1.0",
"kdyby/doctrine-cache": "~1.1"
},
"require-dev": {
"nette/tester": "@dev",
Expand Down
6 changes: 3 additions & 3 deletions src/Kdyby/Doctrine/DI/OrmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class OrmExtension extends Nette\DI\CompilerExtension
'default' => 'Kdyby\DoctrineCache\Cache',
'apc' => 'Doctrine\Common\Cache\ApcCache',
'array' => 'Doctrine\Common\Cache\ArrayCache',
'memcache' => 'Doctrine\Common\Cache\MemcacheCache',
'memcache' => 'Kdyby\DoctrineCache\MemcacheCache',
'redis' => 'Doctrine\Common\Cache\RedisCache',
'xcache' => 'Doctrine\Common\Cache\XcacheCache',
);
Expand Down Expand Up @@ -443,7 +443,7 @@ protected function processMetadataDriver(Nette\DI\ServiceDefinition $metadataDri
$serviceName = $this->prefix($prefix . '.driver.' . str_replace('\\', '_', $namespace) . '.' . $impl . 'Impl');

$this->getContainerBuilder()->addDefinition($serviceName)
->setClass($driver->entity)
->setClass('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver')
->setFactory($driver->entity, $driver->arguments)
->setAutowired(FALSE);

Expand Down Expand Up @@ -475,7 +475,7 @@ protected function processCache($cache, $suffix)
}

$def = $builder->addDefinition($serviceName = $this->prefix('cache.' . $suffix))
->setClass($cache->entity)
->setClass('Doctrine\Common\Cache\Cache')
->setFactory($cache->entity, $cache->arguments)
->setAutowired(FALSE);

Expand Down

0 comments on commit 4ecd9c8

Please sign in to comment.