This is (shorter) table structure:
-
id
-
name
-
last_date
This is code:
$dependency = new CDbCacheDependency('SELECT MAX(last_date) FROM table WHERE id='.$id);
$post= Post::model()->cache(3600, $dependency)->findByPk($id);
Using CWebLogRoute I see:
02:17:50.937169 trace system.db.CDbCommand
Querying SQL: Select t.id, t.name, blabla FROM post blabla
02:17:50.937511 trace system.db.CDbCommand
select max(date) from post where id=blabla
02:17:50.938518 trace system.caching.CApcCache
Serving... bla bla (this is from cache)
Why do I have these frist system.db.CDbCommand?
Tnx