[Jifty-commit] r1264 - in jifty/trunk:
share/web/templates/__jifty/css
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jun 12 11:12:53 EDT 2006
Author: trs
Date: Mon Jun 12 11:12:39 2006
New Revision: 1264
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/templates/__jifty/css/dhandler
Log:
r12863 at zot: tom | 2006-06-12 11:12:22 -0400
The generation time isn't a good way to keep track of a specific generated CSS across multiple fastcgi processes, plus, we want to cache forever.
Modified: jifty/trunk/share/web/templates/__jifty/css/dhandler
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/css/dhandler (original)
+++ jifty/trunk/share/web/templates/__jifty/css/dhandler Mon Jun 12 11:12:39 2006
@@ -2,15 +2,17 @@
Jifty->web->generate_css;
use HTTP::Date ();
-my $last_modified = HTTP::Date::time2str( Jifty->web->cached_css_mtime );
-if ( Jifty->handler->cgi->http('If-Modified-Since') eq $last_modified ) {
+if ( Jifty->handler->cgi->http('If-Modified-Since')
+ and $m->dhandler_arg eq Jifty->web->cached_css_digest . '.css' )
+{
+ Jifty->log->debug("Returning 304 for cached css");
$r->header_out( Status => 304 );
return;
}
$r->content_type("text/css");
-$r->header_out('Last-Modified' => $last_modified);
+$r->header_out( 'Expires' => HTTP::Date::time2str(time + 31536000) );
Jifty->web->out( Jifty->web->cached_css );
return;
More information about the Jifty-commit
mailing list