I am using Doctrine with SF2 and APC.  I know that, in my case, the
class metadata is cached in the user cache.  The class files
themselves would probably appear in the system cache.  I found this by
looking at apc.php (if you're not sure about this look at the manual
on php.net)

To enable caching for Doctrine in Symfony, put this in your
config_prod.php (you won't want to use APC in dev):

doctrine:
    orm:
        metadata_cache_driver: apc
        query_cache_driver: apc
        result_cache_driver: apc


On May 5, 12:39 pm, winzou <alexandre.ba...@gmail.com> wrote:
> Hi,
>
> Doctrine2 has a cache system. But does Symfony2 use it?
>
> I'm using FOS\UserBundle and on the page /user/{username}, if I'm logged
> into "test" user and want to see /user/test, then 2 requests are executed.
> And these two requests are exactly the same, namely something like
> $someObject->findUserBy('username', 'test');
> According to the webprofiler, no cache is used for the second request.
>
> So is there any configuration step to make Doctrine2 use the cache within a
> Symfony2 project?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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