Bravo List
Go Back   > Bravo List > Source Code > Active Trackers > Project U-232
Old 24th September 2021, 16:38
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Senior Member
Join Date: Jul 2013
Posts: 342
Default flush memcache

PHP Code:
 * This file simply provides the user with a button to flush the memcache servers
 * author:  Zachary Brown

//Array of server:port
$memcache_servers = array('');

$memcache_servers as $memserv){
$memparts explode(':',$memserv);
$servername $memparts[0];
$serverport $memparts[1];
$memcache_obj memcache_connect($servername,$serverport);
$memcache_obj){die("Could not connect to memcache server $servername");}
memcache_flush($memcache_obj))){die("Could not flush cache of $servername");}
"Flush of $servername successful<br>";    
"<br>All servers have been flushed<br>";


Please be aware that flushing the cache can lead to performance problems and website slowness for a couple minutes!<br><br>
<form method="post" action="flush-memcache.php">
<input name="submit" type="submit" value="FLUSH CACHE">

SAVE AS flush-memcache.php into directory folder /var/www/html/
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 13:08. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2021, vBulletin Solutions Inc.