Difference between #4 and #5 of
Caching strategy

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 ta
able_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 ta
able_name="table_a"')))) { ?>
...content to be cached...
<?php $this->endCache(); } ?>
...other HTML content...
```
[...]
3 1
12 followers
Viewed: 12 213 times
Version: 1.1
Category: How-tos
Written by: darkheir
Last updated by: CeBe
Created on: Nov 13, 2013
Last updated: 10 years ago
Update Article

Revisions

View all history