phpfastcache用于使用HTTP标头缓存整个网页

I want to use output cache like phpfastcache to cache the content of whole webpage with the below example code given on phpfastcache website

<?php
// use Files Cache for Whole Page / Widget
$cache = phpFastCache("files");

$html = $cache->widget_1;

if($html == null) {
    $html = Render Your Page || Widget || "Hello World";
    // Save to Cache 30 minutes
    $cache->widget_1 = array($html, 1800);
}

echo or return your $html;
?>

I also want to use headers for my webpages like Etag or Last-modified headers as validators and Expires and Cache-control for giving refresh information.

How to implement these headers with phpfastcache