mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Use memcache flush in the new PHP class.
This commit is contained in:
@@ -60,8 +60,8 @@ else {
|
||||
|
||||
//memcache flush
|
||||
if ($cmd == "api memcache flush") {
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
unset($cmd);
|
||||
$cache = new cache;
|
||||
$cache->flush();
|
||||
}
|
||||
|
||||
//reloadacl
|
||||
|
||||
@@ -96,7 +96,16 @@ class cache {
|
||||
*/
|
||||
public function flush() {
|
||||
//send a custom event
|
||||
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$event = "sendevent CUSTOM\n";
|
||||
$event .= "Event-Name: MEMCACHE\n";
|
||||
$event .= "Event-Subclass: flush\n";
|
||||
$event .= "API-Command: memcache\n";
|
||||
$event .= "API-Command-Argument: flush\n";
|
||||
echo event_socket_request($fp, $event);
|
||||
}
|
||||
|
||||
//run the memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
|
||||
Reference in New Issue
Block a user