updated cache logic
optimized and cleaned timemap link function