mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 02:13:17 +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);
|
ob_implicit_flush(false);
|
||||||
if ($this->view->beginCache($id, $properties)) {
|
if ($this->view->beginCache($id, $properties)) {
|
||||||
$response->on(Response::EVENT_AFTER_SEND, [$this, 'cacheResponse']);
|
$response->on(Response::EVENT_AFTER_SEND, [$this, 'cacheResponse']);
|
||||||
|
Yii::trace('Valid page content is not found in the cache.', __METHOD__);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$data = $this->cache->get($this->calculateCacheKey());
|
$data = $this->cache->get($this->calculateCacheKey());
|
||||||
@ -171,6 +172,7 @@ class PageCache extends ActionFilter
|
|||||||
$this->restoreResponse($response, $data);
|
$this->restoreResponse($response, $data);
|
||||||
}
|
}
|
||||||
$response->content = ob_get_clean();
|
$response->content = ob_get_clean();
|
||||||
|
Yii::trace('Valid page content is found in the cache.', __METHOD__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user