Beispiel #1
0
 public static function onEndBufferContent(&$content)
 {
     AppCacheManifest::getInstance()->generate($content);
 }
Beispiel #2
0
 public static function checkObsoleteManifest()
 {
     $server = \Freetrix\Main\Context::getCurrent()->getServer();
     $appCacheUrl = $server->get("HTTP_FX_APPCACHE_URL");
     $appCacheParams = $server->get("HTTP_FX_APPCACHE_PARAMS");
     if ($appCacheUrl) {
         $params = json_decode($appCacheParams, true);
         if (!is_array($params)) {
             $params = array();
         }
         \Freetrix\Main\Data\AppCacheManifest::clear($appCacheUrl, $params);
     }
 }
Beispiel #3
0
 /**
  * Gets useAppCache property
  * @return bool
  */
 public function getUseAppCache()
 {
     $appCache = \Freetrix\Main\Data\AppCacheManifest::getInstance();
     return $appCache->isEnabled();
 }