Revision #5 has been created by darkheir on Nov 13, 2013, 1:32:03 PM with the memo:
Typing error
« previous (#4) next (#6) »
Changes
Title
unchanged
Caching strategy
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
caching, filter
Content
changed
[...]
```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...
```[...]