Added cache support and repeated keys are now parsed