Skip to content

Commit

Permalink
Escape 'caching' when used in a sentence; remove unnessesary quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
tilsammans committed Aug 26, 2010
1 parent d3bc970 commit 9301029
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_controller/caching.rb
Expand Up @@ -3,7 +3,7 @@
require 'set' require 'set'


module ActionController #:nodoc: module ActionController #:nodoc:
# Caching is a cheap way of speeding up slow applications by keeping the result of # \Caching is a cheap way of speeding up slow applications by keeping the result of
# calculations, renderings, and database calls around for subsequent requests. # calculations, renderings, and database calls around for subsequent requests.
# Action Controller affords you three approaches in varying levels of granularity: # Action Controller affords you three approaches in varying levels of granularity:
# Page, Action, Fragment. # Page, Action, Fragment.
Expand All @@ -14,7 +14,7 @@ module ActionController #:nodoc:
# Note: To turn off all caching and sweeping, set # Note: To turn off all caching and sweeping, set
# config.action_controller.perform_caching = false. # config.action_controller.perform_caching = false.
# #
# == Caching stores # == \Caching stores
# #
# All the caching stores from ActiveSupport::Cache are available to be used as backends # All the caching stores from ActiveSupport::Cache are available to be used as backends
# for Action Controller caching. This setting only affects action and fragment caching # for Action Controller caching. This setting only affects action and fragment caching
Expand Down
14 changes: 7 additions & 7 deletions actionpack/lib/action_controller/caching/actions.rb
Expand Up @@ -23,15 +23,15 @@ module Caching
# Action caching internally uses the fragment caching and an around # Action caching internally uses the fragment caching and an around
# filter to do the job. The fragment cache is named according to both # filter to do the job. The fragment cache is named according to both
# the current host and the path. So a page that is accessed at # the current host and the path. So a page that is accessed at
# http://david.somewhere.com/lists/show/1 will result in a fragment named # <tt>http://david.example.com/lists/show/1</tt> will result in a fragment named
# "david.somewhere.com/lists/show/1". This allows the cacher to # <tt>david.example.com/lists/show/1</tt>. This allows the cacher to
# differentiate between "david.somewhere.com/lists/" and # differentiate between <tt>david.example.com/lists/</tt> and
# "jamis.somewhere.com/lists/" -- which is a helpful way of assisting # <tt>jamis.example.com/lists/</tt> -- which is a helpful way of assisting
# the subdomain-as-account-key pattern. # the subdomain-as-account-key pattern.
# #
# Different representations of the same resource, e.g. # Different representations of the same resource, e.g.
# <tt>http://david.somewhere.com/lists</tt> and # <tt>http://david.example.com/lists</tt> and
# <tt>http://david.somewhere.com/lists.xml</tt> # <tt>http://david.example.com/lists.xml</tt>
# are treated like separate requests and so are cached separately. # are treated like separate requests and so are cached separately.
# Keep in mind when expiring an action cache that # Keep in mind when expiring an action cache that
# <tt>:action => 'lists'</tt> is not the same as # <tt>:action => 'lists'</tt> is not the same as
Expand Down Expand Up @@ -144,7 +144,7 @@ class ActionCachePath
attr_reader :path, :extension attr_reader :path, :extension


# If +infer_extension+ is true, the cache path extension is looked up from the request's # If +infer_extension+ is true, the cache path extension is looked up from the request's
# path & format. This is desirable when reading and writing the cache, but not when # path and format. This is desirable when reading and writing the cache, but not when
# expiring the cache - expire_action should expire the same files regardless of the # expiring the cache - expire_action should expire the same files regardless of the
# request format. # request format.
def initialize(controller, options = {}, infer_extension = true) def initialize(controller, options = {}, infer_extension = true)
Expand Down
6 changes: 3 additions & 3 deletions actionpack/lib/action_controller/caching/fragments.rb
Expand Up @@ -18,7 +18,7 @@ module Caching
# #
# <% cache(:action => "list", :action_suffix => "all_topics") do %> # <% cache(:action => "list", :action_suffix => "all_topics") do %>
# #
# That would result in a name such as "/topics/list/all_topics", avoiding conflicts with the action cache and with any fragments that use a # That would result in a name such as <tt>/topics/list/all_topics</tt>, avoiding conflicts with the action cache and with any fragments that use a
# different suffix. Note that the URL doesn't have to really exist or be callable - the url_for system is just used to generate unique # different suffix. Note that the URL doesn't have to really exist or be callable - the url_for system is just used to generate unique
# cache names that we can refer to when we need to expire the cache. # cache names that we can refer to when we need to expire the cache.
# #
Expand All @@ -28,7 +28,7 @@ module Caching
module Fragments module Fragments
# Given a key (as described in <tt>expire_fragment</tt>), returns a key suitable for use in reading, # Given a key (as described in <tt>expire_fragment</tt>), returns a key suitable for use in reading,
# writing, or expiring a cached fragment. If the key is a hash, the generated key is the return # writing, or expiring a cached fragment. If the key is a hash, the generated key is the return
# value of url_for on that hash (without the protocol). All keys are prefixed with "views/" and uses # value of url_for on that hash (without the protocol). All keys are prefixed with <tt>views/</tt> and uses
# ActiveSupport::Cache.expand_cache_key for the expansion. # ActiveSupport::Cache.expand_cache_key for the expansion.
def fragment_cache_key(key) def fragment_cache_key(key)
ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views) ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views)
Expand Down Expand Up @@ -71,7 +71,7 @@ def fragment_exist?(key, options = nil)
# #
# +key+ can take one of three forms: # +key+ can take one of three forms:
# * String - This would normally take the form of a path, like # * String - This would normally take the form of a path, like
# <tt>"pages/45/notes"</tt>. # <tt>pages/45/notes</tt>.
# * Hash - Treated as an implicit call to +url_for+, like # * Hash - Treated as an implicit call to +url_for+, like
# <tt>{:controller => "pages", :action => "notes", :id => 45}</tt> # <tt>{:controller => "pages", :action => "notes", :id => 45}</tt>
# * Regexp - Will remove any fragment that matches, so # * Regexp - Will remove any fragment that matches, so
Expand Down

0 comments on commit 9301029

Please sign in to comment.