2011年2月18日星期五

Expiration header not being set?

The location snippet below works except the expiration header is not being set.  The request is made using this kind of URL:

/assets/abcdef/js/my.js

If the JS file is not found in memcached, it gets redirected to static.php which loads the static file into memory.  Do we need to include the headers in the file itself as its being loaded from memcached?

location ~ /assets/([a-zA-Z0-9]+)(/.+) {
                expires max;
                set $memcached_key "$1_$2";
                memcached_pass     localhost:11211;
                error_page         404 =200 /libraries/asset_filter/client/static.php?hash=$1&uri=$2;
}

Thanks

没有评论:

发表评论