Adjust caching in load_fields

Simplify the caching logic and json_encode is about twice as slow as serialize