Hi,

We use this code in ProjectConfiguration.class.php (found on 
symfony-check.org):

<?php

require_once '/usr/share/php/symfony/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
   public function setup()
   {
     // for compatibility / remove and enable only the plugins you want
     $this->enableAllPluginsExcept(array('sfPropelPlugin', 'sfCompat10Plugin'));
   }

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

}


Regards,

Le 03/08/09 16:53, Giovanni Toraldo a écrit :
> Hi,
>
> I cannot found any documentation about the good way to enable the apc
> query cache in doctrine
> (http://www.doctrine-project.org/documentation/manual/1_0/en/caching#drivers:apc)
> with symfony 1.2.
>
> I've tryied to put this snippet in my ProjectConfiguration.class.php:
>
> [...]
>   public function setup()
>   {
>     $this->enableAllPluginsExcept(array('sfPropelPlugin', 
> 'sfCompat10Plugin'));
>
>     $manager = Doctrine_Manager::getInstance();
>     $cacheDriver = new Doctrine_Cache_Apc();
>     $manager->setAttribute(Doctrine::ATTR_RESULT_CACHE, $cacheDriver);
>   }
> [...]
>
> but I get the error:
> Fatal error: Class 'Doctrine_Manager' not found in
> dev/ProjectConfiguration.class.php on line 11
>
> Thanks.
>
>
>    
-- 
Tugdual SAUNIER


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to