1
0
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:
Steve Clay
2008-06-22 15:08:30 +00:00
parent a6d7115a6c
commit 4f615c12f3
15 changed files with 201 additions and 1058 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;