mirror of
https://github.com/mrclay/minify.git
synced 2025-08-11 16:44:44 +02:00
Moved file caching to Minify_Cache_File.
Removed Cache_Lite. Deprecated UseServerCache() in favor of setCache(). Added Groups controller to ab tests.
This commit is contained in:
@@ -43,7 +43,7 @@ abstract class Minify_Controller_Base {
|
||||
,'encodeOutput' => true
|
||||
,'encodeMethod' => null // determine later
|
||||
,'encodeLevel' => 9
|
||||
,'perType' => array() // no per-type minifier options
|
||||
,'minifierOptions' => array() // no minifier options
|
||||
,'contentTypeCharset' => 'UTF-8'
|
||||
,'setExpires' => null // use conditional GET
|
||||
,'quiet' => false // serve() will send headers and output
|
||||
|
@@ -46,6 +46,10 @@ class Minify_Controller_Groups extends Minify_Controller_Base {
|
||||
$groups = $options['groups'];
|
||||
unset($options['groups']);
|
||||
|
||||
if (! isset($_SERVER['PATH_INFO'])) {
|
||||
// no PATH_INFO
|
||||
return $options;
|
||||
}
|
||||
$pi = substr($_SERVER['PATH_INFO'], 1);
|
||||
if (! isset($groups[$pi])) {
|
||||
// not a valid group
|
||||
|
@@ -31,7 +31,7 @@ class Minify_Controller_Version1 extends Minify_Controller_Base {
|
||||
$cacheDir = defined('MINIFY_CACHE_DIR')
|
||||
? MINIFY_CACHE_DIR
|
||||
: null;
|
||||
Minify::useServerCache($cacheDir);
|
||||
Minify::setCache($cacheDir);
|
||||
}
|
||||
$options['badRequestHeader'] = 'HTTP/1.0 404 Not Found';
|
||||
$options['contentTypeCharset'] = MINIFY_ENCODING;
|
||||
|
Reference in New Issue
Block a user