public function write($name, $value)
    {
        $path = explode('.', $name);
        $key = array_shift($path);

        $exists = $this->checkCache($key);

        if ($path) {
            if (!$exists) {
                $this->cache[$key] = new ArrayHelper();
            }
            $this->cache[$key]->set($path, $value);
        } else {
            $this->cache[$key] = new ArrayHelper($value);
        }

        return $exists ? $this->updateRecord($key) : $this->insertRecord($key);
    }