|
|
@ -164,6 +164,10 @@ 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::info( |
|
|
|
|
|
|
|
'Valid page content is not found in the cache.' . print_r($properties,true), |
|
|
|
|
|
|
|
__METHOD__ |
|
|
|
|
|
|
|
); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$data = $this->cache->get($this->calculateCacheKey()); |
|
|
|
$data = $this->cache->get($this->calculateCacheKey()); |
|
|
@ -171,6 +175,7 @@ class PageCache extends ActionFilter |
|
|
|
$this->restoreResponse($response, $data); |
|
|
|
$this->restoreResponse($response, $data); |
|
|
|
} |
|
|
|
} |
|
|
|
$response->content = ob_get_clean(); |
|
|
|
$response->content = ob_get_clean(); |
|
|
|
|
|
|
|
Yii::info('Valid page content is found in the cache.', __METHOD__); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|