public function indexOfKey($key)
    {
        if($this->isKeycacheInvalid())
        {
            $this->regenerateKeyCache();
        }

        if(isset($this->__keycache[$key]))
        {
            return $this->__keycache[$key];
        }

        return -1;
    }