Check whether the data exists in the cache

@param  string $id
@return bool
@throws OperationFailed
323425
public function has($id) {
		try {
			$result = $this->getBackend()->exists($this->prepareId($id));
		}
		catch (PhalconCacheException $exception) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Checking of the data exiting in the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
			} else {
				return false;
			}
		}
		
		return $result;
	}
506517
protected function doFetch($id)
	{
		$cached = $this->cache->load($id);
		return $cached === NULL ? FALSE : $cached;
	}
522907
public function has($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		return $this->getClient()->get($this->prepareId($id)) !== false;
	}
905932
public function actionExists($id)
    {
        $inlineActionMethodName = 'action' . Inflector::camelize($id);
        if (method_exists($this->controller, $inlineActionMethodName)) {
            return true;
        }
        if (array_key_exists($id, $this->controller->actions())) {
            return true;
        }
        return false;
    }
215566
public function exists ($id)
		{
			foreach ($this->_data as $category)
				if ($category->id == $id)
					return true;

			return false;
		}
1368620
protected function exists(int $id = 0): bool
    {
        return (bool)@shmop_open($id ? $id : $this->id, 'a', 0, 0);
    }
712612
public function recordExists($id)
    {
        if (is_object($id)) {
            return true;
        }
        if (is_numeric($id) or $this->shouldBeNumber($id)) {
            return $this->findById($id, true);
        }
        if (is_string($id)) {
            return $this->findByIdentifier($id, true);
        }
    }
638064
public function remove($id)
    {
        if (true === $result = @unlink($this->getCacheFile($id))) {
            $this->log('debug', sprintf('Cache data removed for id `%s`.', $id));
        }

        return $result;
    }
635369
protected function isCachedById(int $id, int $siteId = null)
    {
        // Resolve siteId
        $siteId = SiteHelper::resolveSiteId($siteId);

        if (!isset($this->cacheById[$siteId])) {
            $this->cacheById[$siteId] = [];
        }

        return array_key_exists($id, $this->cacheById[$siteId]);
    }
446357
public function remove($id)
    {
        try {
            return $this->resource->hDel(static::CACHE_KEY, $id);
        } catch (ConnectionException $e) {
            return false;
        }
    }
956124
public function delete($id)
	{
		return file_exists($this->_cache_path.$id) ? unlink($this->_cache_path.$id) : FALSE;
	}
1061862
protected function doDelete($id) {
    $this->cache_clear_all($this->getCacheId($id), $this->cache_table);
    return TRUE;
  }
578847
public function existsId($id) {
        $count = $this->fetchCount(array($this->getDao()->getTableId() => $id));
        return $count > 0 ? true : false;
	}
4780
public function has($id)
    {
        if (array_key_exists($id, $this->entries)) {
            return true;
        }
        if (array_key_exists($id, $this->factories)) {
            return true;
        }
        return false;
    }
1236774
public function isValid($id)
    {
        $ttl = $this->hasOption(self::OPTION_TTL) ? $this->getOption(self::OPTION_TTL) : self::DEFAULT_TTL;
        if ($this->getPersistence()->supportsFeature(\common_persistence_KeyValuePersistence::FEATURE_NX)) {
            return $this->getPersistence()->set(self::PREFIX.$id, 't', $ttl, true);
        } else {
            if ($this->getPersistence()->exists(self::PREFIX.$id)) {
                return false;
            }
            return $this->getPersistence()->set(self::PREFIX.$id, 't', $ttl);
        }
    }
490205
public function contains( $id ) {

		foreach ( $this->caches as $cache ) {
			if ( $cache->contains( $id ) ) {
				return true;
			}
		}

		return false;
	}
295627
public function has($id)
    {
        for ($i = 2;;) {
            if ('service_container' === $id
                || isset($this->aliases[$id])
                || isset($this->services[$id])
            ) {
                return true;
            }

            if (isset($this->privates[$id])) {
                @trigger_error(sprintf('Checking for the existence of the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED);
            }

            if (isset($this->methodMap[$id])) {
                return true;
            }

            if (--$i && $id !== $lcId = strtolower($id)) {
                $id = $lcId;
                continue;
            }

            // We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
            // and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
            if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service')) {
                @trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);

                return true;
            }

            return false;
        }
    }