val is_in_unchecked: UriManager.uri -> bool
val is_in_cooked: UriManager.uri -> bool
val list_all_cooked_uris: unit -> UriManager.uri list
+ val invalidate: unit -> unit
end
=
struct
(* unchecked is used to store objects just fetched, nothing more. *)
let unchecked_list = ref [];;
+ let invalidate _ =
+ let l = HT.fold (fun k (o,g,gl) acc -> (k,(o,Some (g,gl)))::acc) cacheOfCookedObjects [] in
+ unchecked_list := l ;
+ frozen_list := [];
+ HT.clear cacheOfCookedObjects;
+ ;;
+
let empty () =
HT.clear cacheOfCookedObjects;
unchecked_list := [] ;
debug_print (lazy "Who has removed the uri in the meanwhile?");
raise Not_found
;;
+
+let invalidate _ =
+ Cache.invalidate ()
+;;