ETagRenderDecorator Class Reference
The etag render decorator creates a md5 hash of rendered page and compares this with an etag sended along by the browser. More...
Inheritance diagram for
ETagRenderDecorator:
Public Member Functions |
|
render_page ($page_data, $content_render_decorator, $policy=IView::NONE) | |
Render page. |
Detailed Description
The etag render decorator creates a md5 hash of rendered page and compares this with an etag sended along by the browser.
It does this only if no etag is already present, this is: If the site is not cached.
Definition at line 8 of file etagrenderdecorator.cls.php.
Member Function Documentation
ETagRenderDecorator::render_page | ( | $ | page_data, | |
$ | content_render_decorator, | |||
$ | policy = IView::NONE |
|||
) |
Render page.
- Parameters:
-
PageData $page_data IRenderDecorator Decorator to invoke render_content upon int $policy If set to IView::DISPLAY, content is printed, if false it is returned only
- Returns:
- void
Reimplemented from RenderDecoratorBase.
Definition at line 17 of file etagrenderdecorator.cls.php.
00017 { 00018 $ret = parent::render_page($page_data, $content_render_decorator, $policy); 00019 if ($ret && !Common::is_header_sent('etag')) { 00020 $etag = md5($ret); 00021 Common::check_if_none_match($etag); 00022 Common::header('etag', $etag); 00023 // Send Cache headers 00024 Common::header('Pragma', '', true); 00025 Common::header('Cache-Control', 'private, no-cache, must-revalidate', true); 00026 } 00027 return $ret; 00028 }
The documentation for this class was generated from the following file:
- gyro/core/controller/base/renderdecorators/etagrenderdecorator.cls.php