re-adding cache in get_fields(), sorting out cache invalidation issue