protected function setHasCache($id, $value)
    {
        if (!$this->useHasCache) {
            return true;
        }

        unset($this->hasCache[$id]);
        $this->hasCache[$id] = $value;

        if (count($this->hasCache) > $this->hasCacheLength) {
            $this->hasCache = array_slice($this->hasCache, -$this->hasCacheLength, null, true);
        }

        return true;
    }