Stash\Item::getKey PHP Method

getKey() public method

public getKey ( )
    public function getKey()
    {
        return isset($this->keyString) ? $this->keyString : false;
    }

Usage Example

 protected function getAndLog($args)
 {
     $result = call_user_func_array(array($this->cache, 'get'), $args);
     $miss = $this->cache->isMiss();
     $key = $this->cache->getKey();
     if (isset($this->logger)) {
         $this->logger->logRequest($key, !$miss, $result);
     }
     return $result;
 }