Jonathan
Jonathan

Reputation: 15432

Caching in Symfony 3 on PHP 5.6

As APC is considered deprecated, I'd like to move my Symfony application away from it. However the Symfony documentation still heavily refers to it.

Am I correct in thinking that I still need a caching mechanism such as APCu, as PHP 5.6 opcache only provides bytecode caching (and not a key-value store)? If so, are these config values still necessary?

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

framework:
   serializer:
       cache: serializer.mapping.cache.apc

I can't find any mention of APCu in the caching drivers documentation.

Upvotes: 2

Views: 1069

Answers (1)

Richard Pérez
Richard Pérez

Reputation: 1487

The use of APC has been discouraged due some issues that may lead to even break your site, and they even has updated their extension in a while, looking their website http://pecl.php.net/package/APC the last release was in Sep of 2012.

I'm wondering myself why Symfony hasn't update their references about it, however you can read that there are alternatives. Look at here: http://symfony.com/doc/current/reference/configuration/doctrine.html#caching-drivers

For the caching drivers you can specify the values array, apc, memcache, memcached, redis, wincache, zenddata, xcache or service.

So you could use a different alternatives like memcache, memcached, redis, etc.

If you still want to use APC, I found this link, however I haven't test it.

Upvotes: 3

Related Questions