mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 17:57:38 +08:00
Merge pull request #12181 from githubjeka/patch-5
Added PageCache info of in log
This commit is contained in:
@ -164,6 +164,7 @@ class PageCache extends ActionFilter
|
||||
ob_implicit_flush(false);
|
||||
if ($this->view->beginCache($id, $properties)) {
|
||||
$response->on(Response::EVENT_AFTER_SEND, [$this, 'cacheResponse']);
|
||||
Yii::trace('Valid page content is not found in the cache.', __METHOD__);
|
||||
return true;
|
||||
} else {
|
||||
$data = $this->cache->get($this->calculateCacheKey());
|
||||
@ -171,6 +172,7 @@ class PageCache extends ActionFilter
|
||||
$this->restoreResponse($response, $data);
|
||||
}
|
||||
$response->content = ob_get_clean();
|
||||
Yii::trace('Valid page content is found in the cache.', __METHOD__);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user