Description of problem: Static pages currently benefit from "If-Modified-Since" headers which allow a web browser to query the server for a page and only receive the content if it has changed. This is good, but it still requires a round trip to the web server. It is typical of cumin to include a dozen or more individual gets for static resources on a page, and these gets can be avoided. Using the Cache-Control: max-age=N header to give a page an expiration date in seconds avoids the round trip. Initial value for for max-age will be 86400, one day in seconds. This header should be applied to static resources of the following types: text/css, image/gif, image/jpeg, text/javascript, image/png How to reproduce: 1) Navigate through cumin web pages using a browser extension like Firebug to examine HTTP requests/responses. 2) Note that for GET of static resources such as mootools.js or wooly.css the status code returned from the cumin web server is "304 Not Modified" after an initial page is visited with a fresh browser (the first status will be "200 OK") Expected Result: Using a version of cumin with this feature applied, Firebug should indicate that static resources like those above are automatically retrieved from the local cache without a query to the server. Note, different tools may indicate this is in different ways. Firebug will show cached requests as greyed out, and also contains cache fetch information for requests benefiting from the cache. The response headers can also be examined in Firebug to verify that the "Cache-Control max-age=N" header is present in responses for static pages.
Fixed in trunk, revision 4519.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause Static resources in cumin use the "If-Mpdified-Since" http header but are not setting a cache expiration date. Consequence Static content is not transferred for resources which are cached by the browser, but there is still round trip communication to the server when a resource is loaded. This overhead is unnecessary and negatively affects cumin performance. Change Add a Cache-Control max-age header to all static resources served by cumin. Result Setting the expiration times on static resources results in a significant improvement in the number of pages per second that can be served by cumin.
Verified in cumin-0.1.4683-1.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0889.html