gyro/core/lib/components/upfrontcache.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Reads pages from cache without needing a prior routing process 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Lib 00007 */ 00008 class UpfrontCache { 00009 /** 00010 * Try to find page in cache. If so serves it and exits. 00011 */ 00012 public static function serve_from_cache(PageData $page_data) { 00013 $view = ViewFactory::create_view(IViewFactory::PAGE, $page_data->page_template, $page_data); 00014 if ($view->is_cached()) { 00015 $view->render(IView::DISPLAY); 00016 exit; 00017 } 00018 } 00019 }