diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2011-06-26 19:41:49 -0400 |
---|---|---|
committer | Matt Jankowski <mjankowski@thoughtbot.com> | 2011-06-26 19:41:49 -0400 |
commit | eccd5cb6108a7bbddffd8d97be46d4ee06cac150 (patch) | |
tree | 4519daa730b2b39d80e9234acb6314c25737189f | |
parent | 8c110387f442aeaf19357f44fb20c2464a4f2754 (diff) | |
download | rails-eccd5cb6108a7bbddffd8d97be46d4ee06cac150.tar.gz rails-eccd5cb6108a7bbddffd8d97be46d4ee06cac150.tar.bz2 rails-eccd5cb6108a7bbddffd8d97be46d4ee06cac150.zip |
elaborate on how web server configuration to check for static files on disk enables page caching to work without hitting the app server stack
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index 8c583c7ce0..9ea2ab0056 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -16,9 +16,10 @@ module ActionController #:nodoc: # caches_page :show, :new # end # - # This will generate cache files such as <tt>weblog/show/5.html</tt> and <tt>weblog/new.html</tt>, - # which match the URLs used to trigger the dynamic generation. This is how the web server is able - # pick up a cache file when it exists and otherwise let the request pass on to Action Pack to generate it. + # This will generate cache files such as <tt>weblog/show/5.html</tt> and <tt>weblog/new.html</tt>, which match the URLs used + # that would normally trigger dynamic page generation. Page caching works by configuring a web server to first check for the + # existence of files on disk, and to serve them directly when found, without passing the request through to Action Pack. + # This is much faster than handling the full dynamic request in the usual way. # # Expiration of the cache is handled by deleting the cached file, which results in a lazy regeneration approach where the cache # is not restored before another hit is made against it. The API for doing so mimics the options from +url_for+ and friends: |