문제

I have been using ZF2 with PHP 5.3 and APC cache, and now I upgraded to PHP 5.5, and it seems there is no support for APC on PHP 5.5, I read that PHP5.5 have OpCache out of the box, but is it an alternative for APC? If yes How can I configure a Cache Storage Adapter for OpCache? if it is not to replace APC what can I use for PHP5.5? and how to configure an Adapter for it.

도움이 되었습니까?

해결책 2

Use the APCu like @ziollek's said. Starting from Php 5.5 Apc removed in favor of Opcache but APCu is a drop-in replacement for APC and it runs fully compatible with the good old APC.

So, Zend's APC cache storage adapter should work with APCu too.

See: https://github.com/krakjoe/apcu/issues/7

다른 팁

AFAIK OpCache differs from APC in that it's purely for caching scripts. You might want to take a look at the zf2 memcache adapter or hand roll your own with redis by implementing this interface. There are instructions here for implementing the interface, so it shouldn't be hard.

I use both memcache and redis extensively. I find memcache simpler but redis to have more functionality. If you only need a key-value store, i'd go with memcache as the adapter is pre-written.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top