Browse Source

Update PageCache.php

tags/2.0.10
Evgeniy Tkachenko 8 years ago committed by GitHub
parent
commit
931e8cda96
  1. 5
      framework/filters/PageCache.php

5
framework/filters/PageCache.php

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

Loading…
Cancel
Save