How can I use memcache in Joomla? I’m a newbie in this field so please be descriptive with your answer.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will need to install memcached on your server and will probably need root access to do so. You can get memcached from http://www.danga.com/memcached/. It requires libevent, which can be downloaded here: http://www.monkey.org/~provos/libevent/
Finally, you’ll need to get the PHP PECL extension for memcache. To install this, you need to go to the server where PHP is installed and run this command:
Again, you will most likely need root access to your server to do this. After you have libevent, memcached, and the PECL extensions installed, go to the Global Configuration in Joomla and choose
Memory Cacheas the Cache Handler under Cache Settings. After you save the Global Configuration, open it again and more inputs should appear underneath the Cache Handler input. Set Memory Chache Server tolocalhostand the port to11211. This should match the parameters you use to runmemcachedfrom the command line.EDIT: You can also use XCache not only to store data in a way similar to Memcache, but it will also cache the opcode generated by PHP. This way, instead of reading the PHP code from disk and parsing it each time, it will hold the code in memory for the next request.
Be sure to select
XCacheas the Cache Handler in Global Configuration. Read this for information on installing XCache: http://xcache.lighttpd.net/wiki/InstallFromSource