Check whether the data exists in the cache

@param  string $id
@return bool
@throws OperationFailed
496817
public function has($id) {
		$path = $this->preparePath($id);
		$file = $this->openFile($path);
		
		if ($file === false) { // File is absent or is expired
			return false;
		}
		
		fclose($file);
		
		return true;
	}
571260
public function remove($id)
    {
        try {
            if (\apc_delete($id)) {
                $this->removeFromHashmapById($id);

                return true;
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to delete cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }
    }
968263
public function get($id) {
		try {
			$result = $this->getBackend()->get($this->prepareId($id));
		}
		catch (PhalconCacheException $exception) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Fetching of the data from the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
			} else {
				return;
			}
		}
		
		return $result;
	}
331459
public function fetch( $id ) {

		if ( $this->contains( $id ) ) {
			$this->cacheHits++;
			return $this->moveToMostRecentlyUsedPosition( $id );
		}

		$this->cacheMisses++;
		return false;
	}
578847
public function existsId($id) {
        $count = $this->fetchCount(array($this->getDao()->getTableId() => $id));
        return $count > 0 ? true : false;
	}
1126946
function read($id) {
		if ($id!=$this->sid)
			$this->sid=$id;
		return Cache::instance()->exists($id.'.@',$data)?$data['data']:FALSE;
	}
611688
public function store($id, $data)
    {
        $flag = $this->locking ? LOCK_EX : null;
        $file = $this->path . '/' . $id;

        if (! @file_put_contents($file, $data, $flag)) {
            $this->logger->warning("Minify_Cache_File: Write failed to '$file'");
        }

        // write control
        if ($data !== $this->fetch($id)) {
            @unlink($file);
            $this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");

            return false;
        }

        return true;
    }
1299847
protected function doFetch($id)
    {
        $item = $this->cachePool->getItem($this->normalizeKey($id));

        if ($item->isHit()) {
            return $item->get();
        }

        return false;
    }
1228947
public function remove($id) {
		$path = $this->preparePath($id);
		
		if (is_file($path)) {
			if (unlink($path) === false) {
				throw new OperationFailed('Unable to remove the cache content: ' . $path);
			}
		}
		
		return true;
	}
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);
        }
    }
1230407
protected function doHave($id)
    {
        return (bool)$this->redis->hexists($this->namespace, $this->key($id));
    }
1268246
public function existsEmployee($id = null) {
		if (empty($id)) {
			return false;
		}

		$conditions = $this->_getConditionsForEmployee($id);
		$callbacks = false;
		$this->recursive = -1;

		return (bool)$this->find('count', compact('count', 'conditions', 'callbacks'));
	}
651578
public function remove($id)
    {
        try {
            $this->_repository
                    ->createQueryBuilder('c')
                    ->delete()
                    ->where('c._uid = :uid')
                    ->setParameters(array('uid' => $this->getContextualId($id)))
                    ->getQuery()
                    ->execute();
            $this->resetCacheEntity();
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to remove cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }

        return true;
    }
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;
        }
    }
1061862
protected function doDelete($id) {
    $this->cache_clear_all($this->getCacheId($id), $this->cache_table);
    return TRUE;
  }
637435
public function has($id) {
		if (isset($this->_definitions[$id])) {
			return true;
		}
		
		return $this->getLocatorByServiceId($id) !== null;
	}
338545
public function save($id, $data)
    {
        $id = $this->uniqId + '-' + $id;
        if (!$this->apcIsEnabled()) {
            return false;
        }

        if (!$this->contains($id)) {
            if ($this->debug) {
                $this->cache->save($id, $data, 100);
            } else {
                $this->cache->save($id, $data);
            }

            return true;
        }

        return false;
    }