Charaf JRA
Charaf JRA

Reputation: 8334

Doctrine cache for PHP 5.5 and higher

I use a Symfony2 project deployed on a Ubuntu server 14.04(php version 5.5). This version of PHP comes with Opcache built-in, so no need to install APC.

The problem is that I want to use the cache for doctrine ORM but it supports only APC,Memcached... Not Opcache

I want to install APC instead of Opcache but I noticed that APC is for PHP versions lower that 5.5 Can I run APCu with Opcache on the same server? If yes will this solve the problem or there are other better solutions?

Upvotes: 1

Views: 281

Answers (2)

Jakub Matczak
Jakub Matczak

Reputation: 15656

APC had a few use cases. Besides the same functionality the Opcache has (opcode cache), it was also a key-value storage. And that is not included in Opcache and Doctrine needs key-value storage for caching.

Therefore you have a few solutions to choose:

  • APCu - which replaced APC in newer versions, but I think it's not so commonly used anymore.
  • Memcached
  • Redis - similar performance to Memcached but a lot of more functionality.

Upvotes: 1

Shira
Shira

Reputation: 6560

You can install APCu, which is basically APC but without the opcode cache and supports newer PHP versions.

Upvotes: 0

Related Questions