Update cache.php

This commit is contained in:
FusionPBX
2017-07-22 15:52:45 -06:00
committed by GitHub
parent 4cba425e11
commit 84191e4090

View File

@@ -106,14 +106,14 @@ class cache {
fclose($fp);
}
//cache method file
if (strlen($_SESSION['cache']['method']['text']) == "file") {
//cache method file
if ($_SESSION['cache']['method']['text'] == "file") {
$key = str_replace(":", ".", $key);
if (file_exists($_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() {
//cache method memcache
if (strlen($_SESSION['cache']['method']['text']) == "memcache") {
if ($_SESSION['cache']['method']['text'] == "memcache") {
// connect to event socket
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp === false) {
@@ -150,7 +150,7 @@ class cache {
}
//cache method file
if (strlen($_SESSION['cache']['method']['text']) == "file") {
if ($_SESSION['cache']['method']['text'] == "file") {
//send a custom event
$event = "sendevent CUSTOM\n";