+
+# A shared cache where 2 clients serialize objects at the same types, prevents references collision
+class AsyncCache
+ super DuplexCache
+
+ # Should this end use even numbers?
+ var use_even: Bool
+
+ private var last_id: Int is lazy do return if use_even then 0 else 1
+
+ redef fun next_available_id
+ do
+ last_id += 2
+ return last_id
+ end
+end