Extension:Memcached

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).

**Note: 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.

Copy the files in the section and put them into a folder called 'Memcached' in your extensions folder.

Installation
To install this extension, add the following line to LocalSettings.php:

User rights

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