Search code examples
symfony-1.4doctrine-1.2query-cache

Doctrine Query Cache only for given application


Is there any possibility to enable Doctrine's Query Caching for a given application? Tried in Configuration.class.php, but without luck.


Solution

  • You can add your:

      public function configureDoctrine(Doctrine_Manager $manager)
      {
        // Doctrine_Cache_Apc in the example
        $manager->setAttribute(Doctrine::ATTR_QUERY_CACHE, new Doctrine_Cache_Apc());
      }
    

    to your:

    /<project_path>/apps/<app_name>/config/<app_name>Configuration.class.php