public function GetCache($objectclass,$id)
	{
		if ($this->ObjectCacheTimeout <= 0) return null;

		$cachekey = $objectclass . "_" . $id;

		// include the model so any serialized classes will not throw an exception
		$this->IncludeModel($objectclass);

		// see if this object was cached in the level 1 cache
		$obj = $this->_level1Cache->Get($cachekey);

		if ($obj)
		{
			$this->Observe("Retrieved TYPE='$objectclass' ID='$id' from 1st Level Cache",OBSERVE_DEBUG);
			$obj->CacheLevel(1);
			if (!$obj->IsLoaded()) $obj->Refresh($this);
			return $obj;
		}

		// try the level 2 cahce
		$obj = $this->_level2Cache->Get($cachekey);

		if ($obj)
		{
			$this->Observe("Retrieved TYPE='$objectclass' ID='$id' from 2nd Level Cache",OBSERVE_DEBUG);
			$obj->Refresh($this);
			$obj->CacheLevel(2);

			// we just got this from level 2, but it wasn't in level 1 so let's save it in level 1 for
			$this->_level1Cache->Set($cachekey,$obj);

			return $obj;
		}

		$this->Observe("No L1/L2 Cache for TYPE='$objectclass' ID='$id'",OBSERVE_DEBUG);
		// $this->Observe("KEYS =" . serialize($this->_level1Cache->GetKeys()) ,OBSERVE_DEBUG);
		return null;
	}
public function GetCache($objectclass,$id)
	{
		if ($this->ObjectCacheTimeout <= 0) return null;

		$cachekey = $objectclass . "_" . $id;

		// include the model so any serialized classes will not throw an exception
		$this->IncludeModel($objectclass);

		// see if this object was cached in the level 1 cache
		$obj = $this->_level1Cache->Get($cachekey);

		if ($obj)
		{
			$this->Observe("Retrieved TYPE='$objectclass' ID='$id' from 1st Level Cache",OBSERVE_DEBUG);
			$obj->CacheLevel(1);
			if (!$obj->IsLoaded()) $obj->Refresh($this);
			return $obj;
		}

		// try the level 2 cahce
		$obj = $this->_level2Cache->Get($cachekey);

		if ($obj)
		{
			$this->Observe("Retrieved TYPE='$objectclass' ID='$id' from 2nd Level Cache",OBSERVE_DEBUG);
			$obj->Refresh($this);
			$obj->CacheLevel(2);

			// we just got this from level 2, but it wasn't in level 1 so let's save it in level 1 for
			$this->_level1Cache->Set($cachekey,$obj);

			return $obj;
		}

		$this->Observe("No L1/L2 Cache for TYPE='$objectclass' ID='$id'",OBSERVE_DEBUG);
		// $this->Observe("KEYS =" . serialize($this->_level1Cache->GetKeys()) ,OBSERVE_DEBUG);
		return null;
	}
public function GetCache ( $ objectclass , $ id ) { if ( $ this -> ObjectCacheTimeout <= 0 ) return null ; $ cachekey = $ objectclass . "_" . $ id ; // include the model so any serialized classes will not throw an exception
 $ this -> IncludeModel ( $ objectclass ) ; // see if this object was cached in the level 1 cache
 $ obj = $ this -> _level1Cache -> Get ( $ cachekey ) ; if ( $ obj ) { $ this -> Observe ( "Retrieved TYPE='$objectclass' ID='$id' from 1st Level Cache" , OBSERVE_DEBUG ) ; $ obj -> CacheLevel ( 1 ) ; if ( ! $ obj -> IsLoaded ( ) ) $ obj -> Refresh ( $ this ) ; return $ obj ; } // try the level 2 cahce
 $ obj = $ this -> _level2Cache -> Get ( $ cachekey ) ; if ( $ obj ) { $ this -> Observe ( "Retrieved TYPE='$objectclass' ID='$id' from 2nd Level Cache" , OBSERVE_DEBUG ) ; $ obj -> Refresh ( $ this ) ; $ obj -> CacheLevel ( 2 ) ; // we just got this from level 2, but it wasn't in level 1 so let's save it in level 1 for
 $ this -> _level1Cache -> Set ( $ cachekey , $ obj ) ; return $ obj ; } $ this -> Observe ( "No L1/L2 Cache for TYPE='$objectclass' ID='$id'" , OBSERVE_DEBUG ) ; // $this->Observe("KEYS =" . serialize($this->_level1Cache->GetKeys()) ,OBSERVE_DEBUG);
 return null ; }
Retrieves a value from the cache
@param string $objectclass
@param string $id
@return Phreezable
Retrieves a value from the cache