```php
$dependency = new CDbCacheDependency('SELECT last_modification FROM last_table_modifications WHERE taable_name="table_a"');
$rows = Yii::app()->db->cache(1000, $dependency)->createCommand($sql)->queryAll();
```
[...]
<?php if($this->beginCache($id, array('dependency'=>array(
'class'=>'system.caching.dependencies.CDbCacheDependency',
'sql'=>'SELECT last_modification FROM last_table_modifications WHERE taable_name="table_a"')))) { ?>
...content to be cached...
<?php $this->endCache(); } ?>
...other HTML content...
```