Hi,
Is it normal behavior when the HttpCache is active the Yii Debugger still indicates Yii executed database queries?
The behaviors method in my controller looks like:
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
[
'class' => 'yii\filters\HttpCache',
'only' => ['view'],
'lastModified' => function ($action, $params) {
$q = new \yii\db\Query();
return strtotime($q->from('Extension')->where(['id' => $_GET['id']]) ->max('UpdatedAt'));
},
// 'etagSeed' => function ($action, $params) {
// return // generate ETag seed here
// }
],
];
}
When I navigate to my view page the HTTP status is 304, which is as expected.
Image -> image.prntscr.com/image/f59787f6db0a46a2ac01b2b27faf9e7b.png
But I would expect that the Yii Debugger won’t execute a Database Query, while he still executes all queries.
Image -> image.prntscr.com/image/44f2dccf41854523bb9c43f8060c4014.png
| Q | A
| ---------------- | —
| Yii version | 2.0.10
| PHP version | 5.6.25
| Operating system | Windows 10
|Apache | Apache/2.4.23 (Win64) PHP/5.6.25