Get data content from cache key memcache

@param  string $id
@return string

@throws \Mozart\Library\Cache\Exception\MemcacheException
437470
public function get($id)
    {
        if (function_exists('memcache_get')) {
            return $this->memcache->get($id);
        }

        throw new MemcacheException(
            sprintf('key id memcache "%s" not found, are you sure memcache_get function already loaded ?', $id)
        );
    }
229741
public static function getCachedInfo($id, $key = null, $default = null)
    {
        $cacheKey = 'role:' . $id;
        try {
            $result = \Cache::remember($cacheKey, \Config::get('df.default_cache_ttl'), function () use ($id){
                $role = Role::with(
                    [
                        'role_service_access_by_role_id',
                        'service_by_role_service_access'
                    ]
                )->whereId($id)->first();

                if (empty($role)) {
                    throw new NotFoundException("Role not found.");
                }

                $roleInfo = $role->toArray();
                $services = array_get($roleInfo, 'service_by_role_service_access');
                unset($roleInfo['service_by_role_service_access']);

                foreach ($roleInfo['role_service_access_by_role_id'] as $key => $value) {
                    $serviceName = array_by_key_value(
                        $services,
                        'id',
                        array_get($value, 'service_id'), 'name'
                    );
                    $component = array_get($value, 'component');
                    $roleInfo['role_service_access_by_role_id'][$key]['service'] = $serviceName;
                    $roleInfo['role_service_access_by_role_id'][$key]['component'] = trim($component, '/');
                }

                return $roleInfo;
            });

            if (is_null($result)) {
                return $default;
            }
        } catch (ModelNotFoundException $ex) {
            return $default;
        }

        if (is_null($key)) {
            return $result;
        }

        return (isset($result[$key]) ? $result[$key] : $default);
    }
1299847
protected function doFetch($id)
    {
        $item = $this->cachePool->getItem($this->normalizeKey($id));

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

        return false;
    }
1282978
public function getDisplayNameByIdFromCache($id)
    {
        return wei()->arrayCache->get('nickName' . $id, function () use ($id) {
            $user = wei()->user()->find(['id' => $id]);

            return $user ? $user->getNickName() : '';
        });
    }
668747
protected function getFileName($id)
    {
        $directory = $this->getDirectory($id);
        $hash      = sha1($id, false);
        $file      = $directory . DIRECTORY_SEPARATOR . $hash . '.cache';
        return $file;
    }
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;
	}
712577
public function getContents($key, $id)
    {
        if (!$this->exists($key, $id)) {
            return null;
        }
        $data = $_SESSION[self::SCOPE_KEY][$key][$id];
        if (is_array($data)) {
            $data['id'] = $id;
        }
        return $data;
    }
986823
public function read($key)
    {
        $key = $this->_key($key);

        return $this->_Memcached->get($key);
    }
465349
public function getFromCache($ID)
    {
        /* Compute the path */
        $Database = $this->CacheFolder . "/" . $this->CacheDB;

        /* Lookup for the picture in the cache */
        $CacheInfo = $this->isInCache($ID, true, true);

        /* Not in the cache */
        if (!$CacheInfo) {
            return null;
        }

        /* Get the database extended information */
        $DBPos = $CacheInfo["DBPos"];
        $PicSize = $CacheInfo["PicSize"];

        /* Extract the picture from the solid cache file */
        $Handle = @fopen($Database, "r");
        fseek($Handle, $DBPos);
        $Picture = fread($Handle, $PicSize);
        fclose($Handle);

        /* Return back the raw picture data */
        return $Picture;
    }
945124
public function fetch($id)
    {
        $item = $this->cache->getItem((string) $id);

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

        return $item->get();
    }
901397
public function get($id)
    {
        if (!$this->has($id)) {
            $errMsg = sprintf('Failed to get the name of the class nature of the interface %s', $id);
            throw new Exception\ErrorBuildEntityClassNameException($errMsg);
        }

        return $this->entityClassNameCache[$id];
    }
1160667
protected function doContains($id)
    {

        $md5Key = md5($id);

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

        $hit = $this->getCacheProvider()->doContains($md5Key);

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

        return $hit;
    }
1178782
protected function doFetch($id)
    {
        $found = false;
        $val = $this->delegate->get($id, null, $found);
        if ($found) {
            return $val;
        } else {
            return false;
        }
    }
136872
public function fetchById($id)
    {
        $data = $this->getRequest()->getContents($this->getKey(), $id);
        return $data;
    }
1233732
public function getByID($id)
    {
        if(array_key_exists($id, $this->idToSlugCache))
            $slug = $this->idToSlugCache[$id];
        else
            $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id);

        if (!empty($slug)) {
            return $this->getBySlug($slug);
        }

        $this->loadSource();

        if(!isset($this->slugsByID[$id]))
            return null;

        $slug = $this->slugsByID[$id];

        return $this->getBySlug($slug);
    }
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;
    }
699466
public function getOrFail($id)
    {
        $value = $this->get($id, new None());

        if ($value instanceof None) {
            throw new CacheMissException('Cache entry not found');
        }

        return $value;
    }