let file f = try Hashtbl.find digest_cache f with Not_found -> let res = file f in (Hashtbl.add digest_cache f res; res)