Now I am still a caching-novice. I am not quite sure.

Ok so i am on php 5.5+.

PHP opcode cache: I am using opcache bundled with php 5.5. for general php cache.

Drupal modules/installs: I am using redis for everything related to Drupal - ie. modules and install. (is this right? please educate me.)

Is this a real separation or am I just making this up?

Then there is the user cache.

But then what do I use for user-cache? Do I use APCu for that?

http://stackoverflow.com/questions/17370586/what-to-use-instead-of-apc-u...

Signed,
Caching and Confused

Comments

pounard’s picture

You have to differenciate two things:

  • The OPCode cache (formerly APC, xcache, etc...) : only serves the purpose of storing compiled version of PHP code into memory, and make it run faster - this has nothing to do with the later
  • The applicative cache : purely business stuff that Drupal will store into a raw storage in order to avoid to do some business computations too often and be faster

OPCode cache and applicative cache are really very different things, you should in order to understand ignore the word "cache" in the "OPCode cache" term, and replace it with "compiled PHP binary" which makes much more sense.

Considering the APCu (formerly APC user cache) user cache, it's a storage for applicative cache, you can tell Drupal to use it the same way as redis. Main problem with APCu is that it will store cache in the PHP shared memory, which means that you need to have *a lot* of dedicated RAM to the PHP processes to store Drupal data into it. Plus, if you multiple PHP frontends, each frontend will carry its own shared memory, data in those frontends may differs: this means that you can have a cache desync between PHP frontends; That's why we oftenly prefer to use a memcache, or redis or mongodb.

Is that clearer?

SocialNicheGuru’s picture

Status: Active » Closed (works as designed)

MUCH. Thanks.

Redis is storing the applicative cache.
Opcode cache stores php.