I am confused how APC caching hooks into Drupal system or vice-versa.What I knew so far is APC caches the opcodes for the currently being executing PHP file so next time the various compilation steps can be avoided and then opcodes are served directly from RAM. Since a Drupal page is built with various functional blocks like blocks, node, I am not getting how APC helps it serving fast.I know it does but how?

  • 1
    Just the same way it helps with any other PHP app, so it's not really a Drupal question. – Mołot Sep 24 '13 at 10:23
  • @Mołot this was also a part of my question.But I forgot to mention about using APC module. – arpitr Sep 24 '13 at 11:03

APC is PHP's op code cache. If you enable it then it works for any PHP code. All of your Joomla/Wordpress or Drupal sites will execute faster provided you have high value of Hit/Miss ratio( or increase APC RAM if it's less).

If you want further optimization then Drupal can use APC for caching( instead of storing in mysql tables) using Drupal's APC module. I'm not sure about this sentence though.

I too was confused in the same way :)

  • you got me!. Just to confirm,as drupal caches the complete html in the database tables so APC modules helps in storing the html caches to store into RAM instead of hard-disk where mysql tables lies.So what I see is APC module acts like a medium to allow drupal to cache html to RAM.Please correct me. – arpitr Sep 24 '13 at 10:59
  • I think so .. but I'm not sure. It was bit more clear as I read the installtion instruction of the APC Drupal module. Pl. read it. – AgA Sep 24 '13 at 11:00
  • True. $conf['page_cache_without_database'] = TRUE; – arpitr Sep 24 '13 at 11:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.