PHRAS-197 #fix add possibility to override cache namespace

This commit is contained in:
Nicolas Le Goff
2014-07-25 16:59:26 +02:00
parent b4141f92a7
commit ba9ff5d807

View File

@@ -79,7 +79,11 @@ class Manager
$cache = $this->factory->create('array', array());
}
$cache->setNamespace(md5(gethostname().'-'.__DIR__));
if (isset($options['namespace']) && is_string($options['namespace'])) {
$cache->setNamespace($options['namespace']);
} else {
$cache->setNamespace(md5(gethostname().'-'.__DIR__));
}
$this->drivers[$label] = $cache;