Checks if key exists
188633
public function exists($key)
	{
		return isset($this->data[$key]) && ($this->data[$key][1] > time());
	}
1078660
def has_key?(key, opts={})
      key = normalize_key(key) if opts.fetch(:normalize, true)
      @source.has_key?(key)
    end
186109
public boolean exists(String key) throws Exception {
        boolean isExist = false;
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            isExist = jedis.exists(SafeEncoder.encode(key));

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            this.jedisPool.returnBrokenResource(jedis);
            throw e;
        } finally {
            if (jedis != null) {
                this.jedisPool.returnResource(jedis);
            }
        }
        return isExist;
    }
605485
def exists?(key, parameters = {})
      begin
        @memcached.get(normalize(key, parameters)) && true
      rescue  Memcached::Stored
        true
      rescue Memcached::NotFound
        nil
      end
    end
954766
def has_key(self, key):
        """"""
        try:
            if type(self.attrs) == dict:
                return key in self.attrs
            else:
                raise AttributeError    # if attrs is not a dict
        except AttributeError:          # if attrs doesnt exist
            raise NotImplementedError
728388
public static function exists($key)
    {
        $key = explode('.', $key);
        $array = self::$arr[$key[0]];
        unset($key[0]);

        foreach ( $key as $k ) {
            if ( is_array(self::$arr) ) {
                $array = $array[$k];
            } else {
                return false;
            }
        }

        if ( !is_null($array) ) {
            return true;
        } else {
            return false;
        }
    }
1037200
private function exists($key)
    {
        $data = Query::from($this->table)->where('name', '=', $key)->get();

        return  count($data) > 0;
    }
888325
function exists($key) {
		$key=$this->fixheader($key);
		return isset($this->headers[$key]);
	}
1328207
private boolean keyAlreadyExists(String newKey) {

        Collection<?> itemIds = m_table.getItemIds();
        for (Object itemId : itemIds) {
            if (m_table.getItem(itemId).getItemProperty(TableProperty.KEY).getValue().equals(newKey)) {
                return true;
            }
        }
        return false;
    }
19773
def exists(self, key, **opts):
        """"""
        key, store = self._expand_opts(key, opts)
        data = store.get(key)
        # Note that we do not actually delete the thing here as the max_age
        # just for this call may have triggered a False.
        if not data or self._has_expired(data, opts):
            return False
        return True
1278166
def _check_key(self, key):
        
        if not len(key) == 2:
            raise TypeError('invalid key: %r' % key)
        elif key[1] not in TYPES:
            raise TypeError('invalid datatype: %s' % key[1])
602663
protected function hasKey($key)
    {
        return ($this->mode == self::MODE_INDEXED && $key == '') || \array_key_exists($key, $this->params);
    }
659989
protected function exists($key)
    {
        $data = $this->read($key);
        if ($data === false) {
            return false;
        }

        $expire = $data[0];
        if ($expire !== 0 && $expire < time()) {
            // expired, don't keep it around
            $path = $this->path($key);
            $this->filesystem->delete($path);

            return false;
        }

        return true;
    }
82234
def key_exists_in_list_or_dict(key, lst_or_dct):
    """"""
    if isinstance(lst_or_dct, dict) and key in lst_or_dct:
        return True
    elif isinstance(lst_or_dct, list):
        min_i, max_i = 0, len(lst_or_dct)
        if min_i <= key < max_i:
            return True
    return False
1021519
def has(self, key):
        
        if not self.options.enabled:
            return CACHE_DISABLED
        ret = key in self._dict.keys() and not self._dict[key].is_expired()
        logger.debug('has({}) == {}'.format(repr(key), ret))
        return ret
313276
def has_key?(key)
      hashed_key = hash_key(key)
      unless (entry = @btree.get(hashed_key))
        return false
      end

      if entry.is_a?(PEROBS::Array)
        entry.each do |ae|
          return true if ae.key == key
        end
      else
        return true if entry.key == key
      end

      false
    end
712083
def has_key(self, key):
        """"""
        k = self._lowerOrReturn(key)
        return k in self.data