From 9ed8584c3ec3b2063bb26a88fc4e59be068de203 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 12 May 2015 04:14:39 -0400
Subject: [PATCH] Count memcache/apc debug lines

---
 program/lib/Roundcube/rcube_cache_shared.php |    2 +-
 program/lib/Roundcube/rcube_cache.php        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php
index 59e1908..c37f652 100644
--- a/program/lib/Roundcube/rcube_cache.php
+++ b/program/lib/Roundcube/rcube_cache.php
@@ -666,7 +666,7 @@
      */
     private function debug($type, $key, $data = null, $result = null)
     {
-        $line = strtoupper($type) . ' ' . $key;
+        $line = '[' . (++$this->debug_count) . '] ' . strtoupper($type) . ' ' . $key;
 
         if ($data !== null) {
             $line .= ' ' . ($this->packed ? $data : serialize($data));
diff --git a/program/lib/Roundcube/rcube_cache_shared.php b/program/lib/Roundcube/rcube_cache_shared.php
index e156895..c95aedd 100644
--- a/program/lib/Roundcube/rcube_cache_shared.php
+++ b/program/lib/Roundcube/rcube_cache_shared.php
@@ -655,7 +655,7 @@
      */
     private function debug($type, $key, $data = null, $result = null)
     {
-        $line = strtoupper($type) . ' ' . $key;
+        $line = '[' . (++$this->debug_count) . '] ' . strtoupper($type) . ' ' . $key;
 
         if ($data !== null) {
             $line .= ' ' . ($this->packed ? $data : serialize($data));

--
Gitblit v1.9.1