Cache: Only set json serializer option when json is enabled