diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-02-07 19:41:09 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-02-07 19:41:09 +0100 |
commit | e67004f5b686076af0dbf00cf574ac643d003cae (patch) | |
tree | 8a36c8133f69271ca428b8294dc337ad8da4bd9c /lib/exe | |
parent | 6d06b26afab712379b6d070a816f0c71cc76753b (diff) | |
download | rpg-e67004f5b686076af0dbf00cf574ac643d003cae.tar.gz rpg-e67004f5b686076af0dbf00cf574ac643d003cae.tar.bz2 |
trigger JS_CACHE_USE in lib/exe/js.php
This removes the cachekey parameter again and instead follows
@michitux's suggestion to trigger an event for the cache usage
Diffstat (limited to 'lib/exe')
-rw-r--r-- | lib/exe/js.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index c929c9ba5..95ca10e87 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -31,15 +31,9 @@ function js_out(){ global $lang; global $config_cascade; - if (isset($_GET['cacheKey'])) { - $cacheKey = strval($_GET['cacheKey']); - } else { - $cacheKey = ''; - } - // The generated script depends on some dynamic options - $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$cacheKey, - '.js'); + $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); + $cache->_event = 'JS_CACHE_USE'; // load minified version for some files $min = $conf['compress'] ? '.min' : ''; @@ -85,8 +79,8 @@ function js_out(){ // check cache age & handle conditional request // This may exit if a cache can be used - http_cached($cache->cache, - $cache->useCache(array('files' => $cache_files))); + $cache_ok = $cache->useCache(array('files' => $cache_files)); + http_cached($cache->cache, $cache_ok); // start output buffering and build the script ob_start(); |