-let set_obj f obj uri =
- H.add env uri obj; f obj uri
-
-let get_obj f uri =
- try f (H.find env uri) uri
- with Not_found -> raise (ObjectNotFound (lazy (U.string_of_uri uri)))
+let set_entity f (a, uri, b) =
+ let age = get_age () in
+ let entity = (Y.Apix age :: a), uri, b in
+ H.add env uri entity; f entity
+
+let get_entity err f uri =
+ try f (H.find env uri) with Not_found -> err ()