public function persist($identifier, ParameterBagInterface $parameterBag)
    {
        $stateFilename = $this->getStateFilename($identifier);
        if (!touch($stateFilename) || (file_exists($stateFilename) && !is_writable($stateFilename))) {
            throw new IOException("State isn't writable!");
        }

        file_put_contents($stateFilename, serialize($parameterBag));
    }