Update cache.php

This commit is contained in:
FusionPBX
2017-07-22 15:52:45 -06:00
committed by GitHub
parent eb8bcc755e
commit 5b40a0d5dc
+6 -6
View File
@@ -107,13 +107,13 @@ class cache {
} }
//cache method file //cache method file
if (strlen($_SESSION['cache']['method']['text']) == "file") { if ($_SESSION['cache']['method']['text'] == "file") {
$key = str_replace(":", ".", $key); $key = str_replace(":", ".", $key);
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) { if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) {
unlink($_SESSION['cache']['location']['text'] . "/" . $key); unlink($_SESSION['cache']['location']['text'] . "/" . $key);
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) { }
unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp"); if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) {
} unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp");
} }
} }
@@ -126,7 +126,7 @@ class cache {
*/ */
public function flush() { public function flush() {
//cache method memcache //cache method memcache
if (strlen($_SESSION['cache']['method']['text']) == "memcache") { if ($_SESSION['cache']['method']['text'] == "memcache") {
// connect to event socket // connect to event socket
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp === false) { if ($fp === false) {
@@ -150,7 +150,7 @@ class cache {
} }
//cache method file //cache method file
if (strlen($_SESSION['cache']['method']['text']) == "file") { if ($_SESSION['cache']['method']['text'] == "file") {
//send a custom event //send a custom event
$event = "sendevent CUSTOM\n"; $event = "sendevent CUSTOM\n";