mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Cache key add hostname prefix
This commit is contained in:
@@ -182,10 +182,9 @@
|
||||
}
|
||||
}
|
||||
if ($empty_hostname) {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$hostnames[] = event_socket::api('switchname');
|
||||
}
|
||||
|
||||
$hostnames[] = gethostname();
|
||||
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
@@ -193,7 +192,7 @@
|
||||
$hostnames = array_unique($hostnames);
|
||||
$cache = new cache;
|
||||
foreach ($hostnames as $hostname) {
|
||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||
$cache->delete($hostname.":configuration:sofia.conf");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,10 +260,7 @@
|
||||
|
||||
//get system hostname if necessary
|
||||
if (empty($sip_profile_hostname)) {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$sip_profile_hostname = event_socket::api('switchname');
|
||||
}
|
||||
$sip_profile_hostname = gethostname();
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
@@ -335,16 +331,13 @@
|
||||
|
||||
//get system hostname if necessary
|
||||
if (empty($sip_profile_hostname)) {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$sip_profile_hostname = event_socket::api('switchname');
|
||||
}
|
||||
$sip_profile_hostname = gethostname();
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
if (!empty($sip_profile_hostname)) {
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:sofia.conf:".$sip_profile_hostname);
|
||||
$cache->delete($sip_profile_hostname.":configuration:sofia.conf");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -422,7 +415,7 @@
|
||||
if ($empty_hostname) {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$hostnames[] = event_socket::api('switchname');
|
||||
$hostnames[] = gethostname();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -240,16 +240,13 @@
|
||||
}
|
||||
|
||||
//get the hostname
|
||||
if ($sip_profile_hostname == '') {
|
||||
$esl = event_socket::create();
|
||||
if ($esl->is_connected()) {
|
||||
$sip_profile_hostname = event_socket::api('switchname');
|
||||
}
|
||||
if (empty($sip_profile_hostname) {
|
||||
$sip_profile_hostname = gethostname();
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:sofia.conf:".$sip_profile_hostname);
|
||||
$cache->delete($sip_profile_hostname.":configuration:sofia.conf");
|
||||
|
||||
//save the sip profile xml
|
||||
save_sip_profile_xml();
|
||||
|
||||
Reference in New Issue
Block a user