Update the memcache reference to use the new cache PHP class.

This commit is contained in:
Mark Crane
2015-01-16 00:21:02 +00:00
parent 495f4a0226
commit bee6b9ae5e
32 changed files with 207 additions and 231 deletions

View File

@@ -100,14 +100,11 @@ else {
//strip duplicate contexts
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
//delete the dialplan contexts from memcache
//clear the cache
$cache = new cache;
if (sizeof($dialplan_contexts) > 0) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
foreach($dialplan_contexts as $dialplan_context) {
$switch_cmd = "memcache delete dialplan:".$dialplan_context;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
foreach($dialplan_contexts as $dialplan_context) {
$cache->delete("dialplan:".$dialplan_context);
}
}
}