Как использовать memcached с Joomla

Существует намного более изящный ответ, чем любой из них:

sudo apt-get install grc

(который также устанавливает grcat)

Теперь выполнитесь:

echo "[SEVERE] Service is down" | grcat ~/conf.username

, Где conf.myusername содержит:

regexp=SEVERE
colours=on_red
count=more

(по некоторым причинам я не могу найти право regexp для "всего между кавычками")

7
задан John Carter 7 January 2010 в 09:44
поделиться

1 ответ

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:

pecl install memcache

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 Cache as 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 to localhost and the port to 11211. This should match the parameters you use to run memcached from 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 XCache as the Cache Handler in Global Configuration. Read this for information on installing XCache: http://xcache.lighttpd.net/wiki/InstallFromSource

15
ответ дан 6 December 2019 в 06:50
поделиться
Другие вопросы по тегам:

Похожие вопросы: