Fragment caching of widgets problem

Hi,

I’m having trouble with the COutputCache widget. When I try to cache something like this:




if($this->beginCache('test', array('duration'=>60) {

	echo time();

$this->endCache();

}



Then it works perfect, the output stays thesame for one minute. But whenever I try to add the output of a widget (doesn’t matter what kind of widget) to the cache, like this:




if($this->beginCache('test', array('duration'=>60) {

	$this->widget("testWidget");

	echo time();

$this->endCache();

}



Then it just doesn’t work. The app doesn’t give any errors at all, but the output is different every request.

I have no idea what can cause this behaviour. Could it by a problem in my configuration, or might it be a limitation of the server, or something completely different?

(I’m using APC)