Can I use both Memcache and Memcached php extensions on the same server at the same time? Just to be clear so you dont misunderstand what I mean by this question, here is my scenario: I have both Joomla and phpbb for my website. Joomla provides support for both memcached and memcache where as phpbb only provides support for memcache. So I am planning to do this:
1) Install memcached server: apt-get install memcached
2) Install php-memcache to use for phpbb: apt-get install php5-memcache
3) Install php-memcached to use for Joomla: apt-get install php5-memcached
My questions are:
Is it okay to have both memcache and memcached extensions installed and enabled where each of these are used by different php applications at the same time? Would this conflict in any ways?
When I set the memory limit for the memcached server to 512M in
/etc/memcached.conf
, does it mean that this memory limit is going to be shared between bothmemcache
andmemcached
extension? This shouldnt be a problem if say memcache uses more memory than memcached or vice versa? Do they both play nice to each other?In the scenario like this, should I try to give preference to only 1 php extension (like either memcache only in my case) to keep things simple without conflicts between the two or it shouldnt matter. What I mean is, if you say it is okay to use both (for Q1), then out of professional practice, even if both can be used at the same time, should I still try to use the same php extension for both Joomla and phpbb if possible to minimize headaches? Would that make difference in any ways?
@Alin Andrei posted the right answer for this question. I am quoting him here since the answer is hidden in the comments. The credit goes to him: