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

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.