mennake / minify

Automatically exported from code.google.com/p/minify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cache maxAge

GoogleCodeExporter opened this issue · comments

Did you try code from the master branch: https://github.com/mrclay/minify ?
yes

Are you sure this is not a problem with your configuration? (ask on the Google 
Group)
no

Minify commit/version:2.1.4
PHP version: 5.2.17

What steps will reproduce the problem?
cache expiration date is overwritten

GROUPSCONFIG.PHP file =
return array(
    'plugins' => array('//js/jquery.address.js','//js/mylibs/helper.js','//js/plugins.js'),
    'scripts' => array('//js/script.js'),
    'ie' => array('//js/libs/ie9.js','//js/libs/selectivizr-min.js','//js/libs/imgsizer.js'),
);

CONFIG.PHP file = 
$min_serveOptions['maxAge'] = 2000000000;

Expected output:
min/g=plugins ( but also min/g=scripts ) Cache-Control:max-age=2000000000

Actual output:
Cache-Control:max-age=2000000000, max-age=60

cache max-age is overwritten to 60 ms

Original issue reported on code.google.com by daniele....@gmail.com on 9 Nov 2011 at 3:42

shame on me.

you are right, i've an .htaccess in root (mostly based on 
https://github.com/laukstein/ajax-seo/blob/master/.htaccess )
 so /min is excluded from redirects, but not from max-age settings

thanks for all

Original comment by daniele....@gmail.com on 10 Nov 2011 at 12:53

Daniele, does https://github.com/laukstein/ajax-seo/blob/master/.htaccess still 
returns you any error?

Original comment by laukstein on 22 Jul 2013 at 6:04

If you're seeing two "max-age" values, then one of them has to be being altered 
outside PHP (by your web server I assume). The code that writes the 
Cache-Control header in Minify is here (it can't write two values):
https://github.com/mrclay/minify/blob/master/min/lib/HTTP/ConditionalGet.php#L15
5

If you make an empty PHP file and call it, does it send 
Cache-Control:max-age=60 by default?

Original comment by mrclay....@gmail.com on 9 Nov 2011 at 5:43

  • Changed state: NeedInfo