Returns the object from local or extended cache.

@param string $cid Cache ID.

@return mixed Returns the object or FALSE if not found in cache.
196227
protected function getCache($cid)
    {
        if (isset($this->localCache[$cid])) {
            $cache = $this->localCache[$cid];
        } else {
            $cache = $this->loadCache($cid);
            if ($cache !== false) {
                $this->localCache[$cid] = $cache;
            }
        }

        return $cache;
    }
737434
public function run( $cid ) {

		if( isset( $this->model ) && isset( $cid ) ) {

			$modelOptionService	= Yii::$app->factory->get( 'modelOptionService' );

			$mappingType = isset ( $this->modelType ) ? $this->modelType : null;

			$modelOptionService->toggle( $this->model->id, $this->parentType, $cid, $mappingType );

			// Trigger Ajax Success
			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ) );
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
253534
public function get($documentId, $cache = true)
    {
        $rtn = $this->getCache($documentId);

        if (!$cache || !$rtn) {
            list($status, $doc) = $this->sendRequest(urlencode($documentId));

            if ($status == 200) {
                $rtn = $this->setCache($documentId, $doc);
            } else {
                $rtn = null;
            }
        }

        return $this->asDocs ? $this->toDocument($rtn) : $rtn;
    }
1015361
public function get($id)
    {
        if (isset($this->objects[$id])) {
            return $this->objects[$id];
        } else {
            return false;
        }
    }
159026
public function offsetGet($offset)
    {
        if (!parent::offsetExists($offset)) {
            if ($this->_cache) {
                $result = unserialize(apc_fetch($this->_cache_prefix.'-'.$offset));
            } else {
                $result = false;
            }
        } else {
            $result = parent::offsetGet($offset);
        }

        return $result;
    }
344273
public function get($cache = null)
    {
        if (is_null($cache)) {
            $cache = $this->getDefaultCache();
        }

        if ($cache instanceof CacheItemPoolInterface) {
            return $cache;
        }
        if ($cache instanceof CacheInterface) {
            return $cache;
        }

        foreach ($this->callbacks as $callBack) {
            $result = call_user_func($callBack, $cache);
            if ($result instanceof CacheItemPoolInterface) {
                return $result;
            }
            if ($result instanceof CacheInterface) {
                return $result;
            }
        }

        throw new InvalidArgumentException(Message::INVALID_CACHE_ADAPTER);
    }
983612
public function get($id)
	{
		$value = $this->getValue($this->generateUniqueKey($id));
		if($value===false || $this->serializer===false)
			return $value;
		if($this->serializer===null)
			$value=unserialize($value);
		else
			$value=call_user_func($this->serializer[1], $value);
		if(is_array($value) && (!$value[1] instanceof ICacheDependency || !$value[1]->getHasChanged()))
		{
			Yii::trace('Serving "'.$id.'" from cache','system.caching.'.get_class($this));
			return $value[0];
		}
		else
			return false;
	}
537805
public function fetch( $id ) {

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

		$this->cacheMisses++;
		return false;
	}
732402
public function run( $cid ) {

		if( isset( $this->model ) ) {

			$modelLocation = $this->modelLocationService->getById( $cid );

			if( isset( $modelLocation ) && $modelLocation->isParentValid( $this->model->id, $this->parentType ) ) {

				$location = $modelLocation->model;

				$data = [ 'cid' => $modelLocation->id ];

				$this->locationService->delete( $location );

				// Trigger Ajax Success
				return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $data );
			}
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
1198067
public function run( $cid ) {

		if( isset( $this->model ) ) {

			$modelLocation = $this->modelLocationService->getById( $cid );

			if( isset( $modelLocation ) && $modelLocation->isParentValid( $this->model->id, $this->parentType ) ) {

				$location = $modelLocation->model;

				if( isset( $this->scenario ) ) {

					$location->setScenario( $this->scenario );
				}

				if( $location->load( Yii::$app->request->post(), $location->getClassName() ) && $location->validate() ) {

					$modelLocation->type = $this->modelType;

					$this->locationService->update( $location );

					$this->modelLocationService->update( $modelLocation );

					$location->refresh();

					$data = [
						'cid' => $modelLocation->id, 'type' => $modelLocation->type,
						'title' => $location->title,
						'country' => $location->countryName, 'province' => $location->provinceName,
						'region' => $location->regionName, 'city' => $location->cityName,
						'zip' => $location->zip, 'value' => $location->toString()
					];

					// Trigger Ajax Success
					return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $data );
				}

				// Generate Errors
				$errors = AjaxUtil::generateErrorMessage( $location );

				// Trigger Ajax Failure
				return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_REQUEST ), $errors );
			}
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
576336
public function get($key)
	{
		$value = xcache_get($this->id($key));

		if (isset($value))
		{
			return $value;
		}
	}
1056918
protected function _get($id)
	{
		if ( ! is_file($this->_cache_path.$id))
		{
			return FALSE;
		}

		$data = unserialize(file_get_contents($this->_cache_path.$id));

		if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
		{
			unlink($this->_cache_path.$id);
			return FALSE;
		}

		return $data;
	}
503513
public function get($key)
    {
        if (isset($this->cache[$key])) {
            list($expires, $value) = $this->cache[$key];
            if (!$expires || ($expires >= microtime(true))) {
                return $value;
            }
            unset($this->cache[$key]);
        }
        return false;
    }
682775
public function get($cacheId)
    {
        $this->throwExceptionIfNotExists($cacheId);

        if ($this->expired($cacheId)) {
            return $this->getFromCacheable($cacheId);
        }

        return $this->getCachedItem($cacheId);
    }
357266
public static function getFromCache($id)
    {
        $arrayCache = Configuration::getArrayCache();
        if ($arrayCache->contains($id)) {
            return $arrayCache->fetch($id);
        }

        $cacheDriver = Configuration::getCacheDriver();
        if ($cacheDriver !== null) {
            $cacheResult = $cacheDriver->fetch($id);
            if ($cacheResult !== false) {
                $arrayCache->save($id, $cacheResult);
                return $cacheResult;
            }
        }

        return null;
    }
1164232
public function channelGetLevel($cid)
  {
    $channel = $this->channelGetById($cid);
    $levelno = 0;

    if($channel["pid"])
    {
      $levelno = $this->channelGetLevel($channel["pid"])+1;
    }

    return $levelno;
  }
874779
function GetCache($type, $id) {
		if (!isset($this->cache[$type]) || !$this->cache[$type]) // Dont cache this type of call
			return FALSE;
		if (isset($this->_cache[$type][$id]))
			return $this->_cache[$type][$id];
		return FALSE;
	}