Index: /trunk/ChangeLog
===================================================================
--- /trunk/ChangeLog	(revision 432)
+++ /trunk/ChangeLog	(revision 433)
@@ -10,4 +10,5 @@
  * wrong http auth realm
  * #86: remove/edit variable in admin page
+ * fixed #109: fast inc/dec was trying to break ro protection
  * fixed #101, #105: Fixed compatibility issue for apache 1.x
  * fixed #94: Garbage collector disabled when xcache.cacher set to off
Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 432)
+++ /trunk/xcache.c	(revision 433)
@@ -2186,4 +2186,5 @@
 				stored_var = stored_xce->data.var;
 				if (Z_TYPE_P(stored_var->value) == IS_LONG) {
+					zval *zv;
 					stored_xce->ctime = XG(request_time);
 					stored_xce->ttl   = xce.ttl;
@@ -2192,5 +2193,7 @@
 					value += (inc == 1 ? count : - count);
 					RETVAL_LONG(value);
-					Z_LVAL_P(stored_var->value) = value;
+
+					zv = (zval *) xce.cache->shm->handlers->to_readwrite(xce.cache->shm, (char *) stored_var->value);
+					Z_LVAL_P(zv) = value;
 					break; /* leave lock */
 				}
