Skip to content

Commit

Permalink
set a default Cache-Control header, to ensure browser caching is 'act…
Browse files Browse the repository at this point in the history
…ivated' when Combine is used out-of-the box
  • Loading branch information
zefer committed Sep 13, 2010
1 parent 50ed1ba commit 6e39d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Combine.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<cfargument name="jarPath" type="string" required="false" default="path of the directory where the .jar files are located" />
<!--- experimental - use with care! You may want to tweak these values if your webserver has a caching layer that either causes problems, or adds potential performance gains. Disabling 304s will let the caching layer handle the caching according to its configuration. Setting cache-control to 'private' will bypass the caching layer and put the responsibility in the hands of Combine. --->
<cfargument name="enable304s" type="boolean" required="false" default="true" hint="304 (not-modified) is returned when the request's etag matches the current response, so we return a 304 instead of the content, instructing the browser to use it's cache. A valid reason for disabling this would be if you have an effective caching layer on your web server, which handles 304s more efficiently. However, unlike Combine the caching layer will not check the modified state of each individual css/js file. Note that to enable 304s, you must also enable eTags." />
<cfargument name="cacheControl" type="string" required="false" default="" hint="specify an optional cache-control header, which will be returned in each response. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html. An example use is to specify 'private' which will disable proxy caching, only allowing browser caching." />
<cfargument name="cacheControl" type="string" required="false" default="max-age=3600" hint="specify an optional cache-control header, to define caching rules for browsers & proxies. Recommended! See http://palisade.plynt.com/issues/2008Jul/cache-control-attributes/ & http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html." />

<cfscript>
variables.sCachePath = arguments.cachePath;
Expand Down

0 comments on commit 6e39d0e

Please sign in to comment.