public function SetCache($objectclass,$id, Phreezable $val, $includeCacheLevel2 = true, $timeout = null)
	{
		if (is_null($timeout)) $timeout = $this->ObjectCacheTimeout;

		if ($val->NoCache() || $timeout <= 0) return false;

		// if the object hasn't changed at level 1, then supress the cache update
		$obj = $this->_level1Cache->Get($objectclass . "_" . $id);

		if ($obj && $obj->serialize() == $val->serialize())
		{
			$this->Observe("TYPE='$objectclass' ID='$id' level 1 cache has not changed.  SetCache was supressed",OBSERVE_DEBUG);
			return false;
		}

		$this->_level1Cache->Set($objectclass . "_" . $id,$val, $timeout);

		// cache level 2 only if specified
		if ($includeCacheLevel2) $this->_level2Cache->Set($objectclass . "_" . $id,$val, $timeout);
	}
public function SetCache($objectclass,$id, Phreezable $val, $includeCacheLevel2 = true, $timeout = null)
	{
		if (is_null($timeout)) $timeout = $this->ObjectCacheTimeout;

		if ($val->NoCache() || $timeout <= 0) return false;

		// if the object hasn't changed at level 1, then supress the cache update
		$obj = $this->_level1Cache->Get($objectclass . "_" . $id);

		if ($obj && $obj->serialize() == $val->serialize())
		{
			$this->Observe("TYPE='$objectclass' ID='$id' level 1 cache has not changed.  SetCache was supressed",OBSERVE_DEBUG);
			return false;
		}

		$this->_level1Cache->Set($objectclass . "_" . $id,$val, $timeout);

		// cache level 2 only if specified
		if ($includeCacheLevel2) $this->_level2Cache->Set($objectclass . "_" . $id,$val, $timeout);
	}
public function SetCache ( $ objectclass , $ id , Phreezable $ val , $ includeCacheLevel2 = true , $ timeout = null ) { if ( is_null ( $ timeout ) ) $ timeout = $ this -> ObjectCacheTimeout ; if ( $ val -> NoCache ( ) || $ timeout <= 0 ) return false ; // if the object hasn't changed at level 1, then supress the cache update
 $ obj = $ this -> _level1Cache -> Get ( $ objectclass . "_" . $ id ) ; if ( $ obj && $ obj -> serialize ( ) == $ val -> serialize ( ) ) { $ this -> Observe ( "TYPE='$objectclass' ID='$id' level 1 cache has not changed.  SetCache was supressed" , OBSERVE_DEBUG ) ; return false ; } $ this -> _level1Cache -> Set ( $ objectclass . "_" . $ id , $ val , $ timeout ) ; // cache level 2 only if specified
 if ( $ includeCacheLevel2 ) $ this -> _level2Cache -> Set ( $ objectclass . "_" . $ id , $ val , $ timeout ) ; }
Sets value in the cache
@param string $objectclass
@param string $id
@param Phreezable $val
@param bool $includeCacheLevel2 true = cache both level 1 and 2.  false = cache only level 1. (default true)
@param int optionally override the default cache timeout of Phreezer->ObjectCacheTimeout (in seconds)
Sets value in the cache