فهرست منبع

When the cache is deleted log details to the syslog server.

FusionPBX 3 سال پیش
والد
کامیت
f102f32950
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      resources/classes/cache.php

+ 11 - 0
resources/classes/cache.php

@@ -106,6 +106,11 @@ class cache {
 	 */
 	 */
 	public function delete($key) {
 	public function delete($key) {
 
 
+		//debug information
+			openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+			syslog(LOG_WARNING, "debug: cache: [key: ".$key.", script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
+			closelog();
+
 		//cache method memcache 
 		//cache method memcache 
 			if ($_SESSION['cache']['method']['text'] == "memcache") {
 			if ($_SESSION['cache']['method']['text'] == "memcache") {
 				//connect to event socket
 				//connect to event socket
@@ -166,6 +171,12 @@ class cache {
 	 * Delete the entire cache
 	 * Delete the entire cache
 	 */
 	 */
 	public function flush() {
 	public function flush() {
+
+		//debug information
+			openlog("fusionpbx", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+			syslog(LOG_WARNING, "debug: cache: [flush: all, script: ".$_SERVER['SCRIPT_NAME'].", line: ".__line__."]");
+			closelog();
+
 		//cache method memcache 
 		//cache method memcache 
 			if ($_SESSION['cache']['method']['text'] == "memcache") {
 			if ($_SESSION['cache']['method']['text'] == "memcache") {
 				// connect to event socket
 				// connect to event socket