Skip to content

Commit

Permalink
elaborate on how web server configuration to check for static files o…
Browse files Browse the repository at this point in the history
…n disk enables page caching to work without hitting the app server stack
  • Loading branch information
mjankowski committed Jun 26, 2011
1 parent 8c11038 commit eccd5cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions actionpack/lib/action_controller/caching/pages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ module Caching
# 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:
Expand Down

0 comments on commit eccd5cb

Please sign in to comment.