Added graph history states, added json format in cache