diff flag.php @ 69:dd4ddedca4c5

Add convenience header ScriptIncludeCache Split CacheTimeCheck and FileCacheSet
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 11 Oct 2012 23:32:14 +0200
parents 0f1e08cdfff2
children fae4322d6c29
line wrap: on
line diff
--- a/flag.php	Thu Oct 11 23:16:53 2012 +0200
+++ b/flag.php	Thu Oct 11 23:32:14 2012 +0200
@@ -7,9 +7,9 @@
 
 include_once 'CacheTimeCheck.inc';
 
-$cache = CacheTimeCheck::instance(__FILE__);
-$cache->includeOnce('Language.inc');
-$cache->includeOnce('common-functions.inc');
+$scriptCache = ScriptIncludeCache::instance(__FILE__);
+$scriptCache->includeOnce('Language.inc');
+$scriptCache->includeOnce('common-functions.inc');
 
 $active = $_GET['active'];
 $lang = $_GET['lang'];
@@ -30,6 +30,8 @@
   $name .= "-active";
 $name .= ".png";
 
+$cache = new CacheTimeCheck($name);
+$cache->addParent($scriptCache);
 $cache->cache_time($name);
 $cache->CheckHttpModified();