Dangling Cruze
Dangling Cruze

Reputation: 3433

What is longterm alternate for APC for PHP 5.5?

I was having a scenario where on every request i had to fetch the data from database. SO i thought of using APC to cache the variable. But later found out that APC was no longer the choice for newer versions of PHP. So i checked out memcahced and APCu. Memcached is not the choice according to this. And i'm not sure for how long APCu will be supported by the developer community because i don't want to change my code once it it deployed.

Opcache is what replaced APC but it does not provide any way to cache variables. I'm confused. A little help would be appreciated.

Thanks in advance.

Upvotes: 0

Views: 335

Answers (1)

Alister Bulman
Alister Bulman

Reputation: 35149

Opcache caches the bytecode, and APCu is a simplified version APC, that only caches the userland part (and it's entirely compatible with the old APC, it just doesn't tdo the bytecaching any more). If you still want to cache locally, APCu is the way to go, and I'll be using it myself when it comes to such caching.

For larger, cross-machine caches, I'll also use Memcached.

Upvotes: 1

Related Questions