Why Don't Apply Dependency For Cache In Cactivedataprovider?!

Hi,

I have this:


$dependency = new CDbCacheDependency('SELECT MAX(id) FROM {{Product}}');

$dataProvider = new CActiveDataProvider(Product::model()->cache(86400, $dependency, 2));

Why don’t apply dependency for cache?! I see all query run in background and didn’t seem the ‘SELECT MAX(id) FROM…’ query!

Thanks

Nabi

Hi, Nbi

You should add a Cache component in your config file first