Gets a resource from cache by its repo internal id.
@param string $id resource's repo internal id
@return FedoraResource
@throws NotInCache
551469
public function getById(string $id): FedoraResource {
        if (!isset($this->id2uri[$id])) {
            throw new NotInCache();
        }
        return $this->cache[$this->id2uri[$id]];
    }
193486
protected function doFetch($id)
    {
        $md5Key = md5($id);

        $kvm = KVMLogger::instance('anycontent-cache');

        $data = $this->getCacheProvider()->doFetch($md5Key);

        if ($data)
        {
            $this->hit++;
            $message = $kvm->createLogMessage('Cache hit', [ 'key' => $id, 'md5' => md5($id), 'doctrine-namespace' => $this->getNamespace() ]);
            $kvm->debug($message);
        }
        else
        {
            $this->miss++;
            $message = $kvm->createLogMessage('Cache miss', [ 'key' => $id, 'md5' => md5($id), 'doctrine-namespace' => $this->getNamespace() ]);
            $kvm->debug($message);
        }

        return $data;

    }
1245570
public function load($id)
    {
        $language = $this->cache->get('ez-language-' . $id);
        if ($language === null) {
            $language = $this->innerHandler->load($id);
            $this->storeCache([$language]);
        }

        return $language;
    }
137962
public function getOrFail($id)
    {

        if ($model = $this->get($id)) {
            return $model;
        }

        $typeName = Type::of($this->prototype());

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
919473
public static function factory($id)
    {
        $id = (string)$id;
        if (!isset(static::$resources[$id])) {
            static::$resources[$id] = new static($id);
        }
        return static::$resources[$id];
    }
245251
public function findCacheById(int $id)
    {

        // Check if already in addToCache
        if ($this->isCachedById($id)) {
            return $this->cacheById[$id];
        }

        return null;
    }
103821
public static function getByIdentifier($id)
    {
        $file = config('filer.hash_routes') ? static::whereHash($id)->first() : static::find($id);

        if (!$file) {
            throw (new ModelNotFoundException)->setModel(static::class);
        }

        return $file;
    }
923245
public function get($id)
    {
        /* @var $container InteropContainerInterface */
        foreach ($this->getContainers() as $container) {
            if ($container->has($id)) {
                return $container->get($id);
            }
        }

        // not found
        throw new NotFoundException(
            Message::get(Message::SERVICE_ID_NOT_FOUND, $id),
            Message::SERVICE_ID_NOT_FOUND
        );
    }
1307755
public function resourceId($id) : self
    {
        $this->id = ($id instanceof \Illuminate\Database\Eloquent\Model) ? $id->getKey() : $id;

        return $this;
    }
1321679
public function fetch($id)
    {
        try {
            $this->stopWatch->start('cache');
            $value = $this->cache->fetch($id);
            $this->stopWatch->stop('cache');
        }
        catch (\Exception $ex) {
            $value = false;
        }

        $this->collect('fetch', $id, $value != false, $value);

        return $value;
    }
750471
public function find($id)
    {
        $resourceName = constant($this->type . '::RESOURCE');

        $url      = sprintf("%s/%s/%s", self::ENDPOINT, $resourceName, $id);
        $response = $this->fetch($url, substr($resourceName, 0, strlen($resourceName) - 1));

        return new $this->type($response);
    }
941854
public function get($id)
    {
        if (isset($this->cache[$id])) {
            return $this->cache[$id];
        }

        throw new NotFoundException('No entry was found for this identifier.');
    }
54724
public function get($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return $container->get($id);
			}
		}
		throw new NotFoundException("'$id' value not found");
	}
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;
    }
1264713
public function get($id)
    {
        if (isset($this->keys[$id])) {
            $this->requested[$id] = true;
            if (isset($this->callables[$id])) {
                $this->values[$id] = $this->callables[$id]();
                unset($this->callables[$id]);
            }
            return $this->values[$id];
        }
        throw new ContainerNotFoundException('Container identifier[' . $id . '] not found.');
    }
537805
public function fetch( $id ) {

		if ( $this->contains( $id ) ) {
			$this->cacheHits++;
			return $this->inMemoryCache[ $id ];
		}

		$this->cacheMisses++;
		return false;
	}
526443
public function get($id)
	{
		$success = FALSE;
		$data = wincache_ucache_get($id, $success);

		// Success returned by reference from wincache_ucache_get()
		return ($success) ? $data : FALSE;
	}