public function saveReferences(array $viewReferences, $parentId = null, $parentLocale = null, $reset = true)
    {
        // Reset redis if wanted
        if ($reset) {
            $this->manager->reset();
        }

        // Parse the viewReferences
        foreach ($viewReferences as $viewReference) {
            /** @var View $view */
            $view = $viewReference['view'];
            foreach ($view->getReferences() as $locale => $reference) {
                if ($reference !== null) {
                    // save the viewReference
                    $id = $this->saveReference($reference, $parentId, $parentLocale);
                    // if children, save them
                    if (array_key_exists('children', $viewReference) && !empty($children = $viewReference['children'])) {
                        $this->saveReferences($children, $id, $reference->getLocale(), false);
                    }
                }
            }
        }
    }