Does Yii do caching when running widget?

Hello everybody,

The reason I ask this question is because I’ve bumped strange problem.

Let’s say I have 2 modules, module Facebook and module Twitter.

Both modules have widget stored in component directory with a same name but not same function, let say "mywidget".

Now in one controller, I want to display these two widgets, I write like this :


$this->widget('application.module.facebook.components.mywidget');

$this->widget('application.module.twitter.components.mywidget');

But the code above is causing problem, because the second widget although I already specify its location to be ‘application.module.twitter.components.mywidget’ but it’s still running the facebook’s one. How to force it to run twitter’s ?

Thanks…

You can’t use 2 same named classes in your PHP application. Consider renaming.

Okay… thanks Samdark

It fix the problem :)