Index: /trunk/mod_cacher/xc_cacher.c
===================================================================
--- /trunk/mod_cacher/xc_cacher.c	(revision 1051)
+++ /trunk/mod_cacher/xc_cacher.c	(revision 1057)
@@ -389,21 +389,16 @@
 }
 /* }}} */
-static void xc_counters_inc(time_t *curtime, zend_uint *curslot, time_t period, zend_ulong *counters, zend_uint count TSRMLS_DC) /* {{{ */
-{
-	time_t n = XG(request_time) / period;
+static inline void xc_counters_inc(time_t *curtime, zend_uint *curslot, time_t interval, zend_ulong *counters, zend_uint count TSRMLS_DC) /* {{{ */
+{
+	time_t n = XG(request_time) / interval;
 	if (*curtime != n) {
 		zend_uint target_slot = n % count;
-		if (n - *curtime > period) {
-			memset(counters, 0, sizeof(counters[0]) * count);
-		}
-		else {
-			zend_uint slot;
-			for (slot = advance_wrapped(*curslot, count);
-					slot != target_slot;
-					slot = advance_wrapped(slot, count)) {
-				counters[slot] = 0;
-			}
-			counters[target_slot] = 0;
-		}
+		zend_uint slot;
+		for (slot = advance_wrapped(*curslot, count);
+				slot != target_slot;
+				slot = advance_wrapped(slot, count)) {
+			counters[slot] = 0;
+		}
+		counters[target_slot] = 0;
 		*curtime = n;
 		*curslot = target_slot;
@@ -412,5 +407,5 @@
 }
 /* }}} */
-static void xc_cache_hit_unlocked(xc_cache_t *cache TSRMLS_DC) /* {{{ */
+static inline void xc_cache_hit_unlocked(xc_cache_t *cache TSRMLS_DC) /* {{{ */
 {
 	cache->hits ++;
@@ -423,6 +418,5 @@
 
 	xc_counters_inc(&cache->hits_by_second_cur_time
-			, &cache->hits_by_second_cur_slot
-			, 1
+			, &cache->hits_by_second_cur_slot, 1
 			, cache->hits_by_second
 			, sizeof(cache->hits_by_second) / sizeof(cache->hits_by_second[0])
