I have a VPS running a few independent Drupal sites (not multi-site). What considerations do I need to make (if any) when installing memcache?

2 Answers 2


Make sure your settings.php file has a unique prefix for each site that has memcache enabled. I got tripped up by this, and everything went berserk. This thread fixed it for me. Basically, this is the only issue you would have as far as conflicts.


Like APC, memcache works indepedently of your sites. Make sure you have enough memory for it to function correctly. You can get a rough idea idea by seeing how much disk space all of your drupal databases take up. Not all tables in each database will be cached of course, but so long as you have that much memory to dedicate to memcache, you are good to go.

Said differently, as an example I have 12 sites on my VPS 4 gigs of RAM total with 1 Gig dedicated to memcache. I have never had a problem. Total size of databases on disk is around 400 mb.

  • Did this answer your question or can I help clarify a bit more?
    – blue928
    Commented Apr 4, 2012 at 0:28

Then important thing is that you give each site a different prefix, see http://drupal.org/node/1131468.

Of course, it's the same about memory as with APC. Depending on how much memory you have, you might want to use memcache only for sites which have a high(er) load than others and keep cache of the less used ones in the database or use another cache backend that doesn't sit in memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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