Phalcon\Cache\Backend\Aerospike::exists PHP Method

exists() public method

public exists ( string $keyName = null, integer $lifetime = null ) : boolean
$keyName string
$lifetime integer
return boolean
    public function exists($keyName = null, $lifetime = null)
    {
        if ($keyName === null) {
            $prefixedKey = $this->_lastKey;
        } else {
            $prefixedKey = $this->getPrefixedIdentifier($keyName);
        }
        if (!$prefixedKey) {
            return false;
        }
        $aKey = $this->buildKey($prefixedKey);
        $status = $this->db->get($aKey, $cache);
        return $status == \Aerospike::OK;
    }