title: Symfony 2: Doctrine Cache Namespace
body: <pre><code>doctrine:
      orm:
          metadata_cache_driver:
              type: xcache
              namespace: %foobar%
  </code></pre>
  
  <p>hi, i want set the doctrine cache namespace via parameter like %foobar%. the parameter %foobar% will set via compilerPass</p>
  
  <pre><code>class FoobarCompiler implements CompilerPassInterface {
      public function process(ContainerBuilder $container) {
          $container-&gt;setParameter('foobar', uniqid());
      }
  }
  </code></pre>
  
  <p>and this compilerPass ist register in a bundle class via:</p>
  
  <pre><code>public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container) {
      $container-&gt;addCompilerPass(new \FQNS\Compiler\FoobarCompiler());
  }
  </code></pre>
  
  <p>but i get this error:</p>
  
  <blockquote>
    <p>[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
     You have requested a non-existent parameter "foobar".</p>
  </blockquote>
  
  <p>any idea how can i set the doctrine cache namespace via this parameter "foobar" ?</p>
  
  <p>greez &amp; thx,
    sky...</p>