Extension:Memcached

The Memcached extension provides an interface for checking if Memcached is working fine.

Description
When I installed Memcached on my wiki server I had a problem to regularly check if it works fine or should be restarted. Because sometimes it crashes and the wiki opens way too long which is annoying. I assume this happens when Memcached works many days non-stop. So I added a cron task to restart the Memcached service once a day in case it crashes again. But what if it crashes before the cron task runs? All users have to wait until it is restarted.

So every day I have to login through SSH to check the status of Memcached service. This is boring to type login and password each time. There should be an easier way. At first I found a PHP-script for checking Memcached status. It was good but was allowed to run by everyone who knew its file name. For security purpose we don't want anyone to find out the IP and port of our Memcached server(-s). Thus I came to the conclusion: it would be great to implement it as a MediaWiki extension and deny access for everyone but admin.

Since I didn't find any Memcached extension at all (which is shame because, for instance, APC extension exists for a long time), I decided to create my own. I've been modifying plenty of MediaWiki extensions for myself but never created one. This is my first separate extension so suggestions are welcome.

Usage
First of all, you need to install Memcached and define its servers in $wgMemCachedServers. Don't forget to install PECL memcache for PHP (do not confuse with PECL memcached which is currently not supported).

If you've already done it go to "Special:Memcached" and you'll see the list of memcached servers with their status (working, not working or no memcache service found).

In theory, this extension can be used with the versions of MediaWiki older than 1.19 but it's not been tested.

Download instructions
Since I'm quite busy with different projects, I've got no time for MediaWiki git stuff. This extension consists of only two files so far and thus it's easier for me to just publish them here.

Installation

 * User rights
 * memcached - the right to view the Special:Memcached page. By default allowed only for bureaucrats. You may change it if you wish.

Memcached.i18n.php
muß noch zur Datei „LocalSettings.php“ hinzugefügt werden.', );

/** Ukrainian (українська) * @author UA2004 */ $messages['uk'] = array(	'memcached' => 'Memcached',	'memcached-desc' => 'Надає інтерфейс для перевірки роботи служби Memcached на сервері',	'memcached-data-received' => 'Тестові дані успішно зчитано з Memcached!',	'memcached-data-set' => 'Тестові дані записано у Memcached! Будь ласка, оновіть сторінку, щоб побачити чи служба працює належним чином.',	'memcached-works' => 'Служба Memcached працює!',	'memcached-not-working' => 'Служба Memcached НЕ працює! Перезапустіть її, будь ласка.',	'memcached-not-found' => 'Службу Memcached не знайдено на цьому сервері!',	'memcached-pecl-not-found' => 'Розширення PECL memcache не знайдено на цьому сервері!',	'memcached-servers-not-set' => 'Сервери Memcached не вказано! Будь ласка, додайте їх у змінну $wgMemCachedServers у файлі LocalSettings.php.', );