提交 6c0ea887 编写于 作者: R Rafael Mendonça França

Merge pull request #8339 from latortuga/cache-digest-opt-out-cleanup

Cache digest opt out cleanup
## Rails 4.0.0 (unreleased) ##
* Add option flag to `CacheHelper#cache` to manually bypass automatic template digests:
<% cache project, skip_digest: true do %>
...
<% end %>
*Drew Ulmer*
* No sort Hash options in #grouped_options_for_select. *Sergey Kojin*
* Accept symbols as #send_data :disposition value *Elia Schito*
......
......@@ -126,7 +126,7 @@ def cache(name = {}, options = nil, &block)
# cannot be manually expired unless you know the exact key which is the
# case when using memcached.
def cache_fragment_name(name = {}, options = nil)
skip_digest = options && options.delete(:skip_digest)
skip_digest = options && options[:skip_digest]
if skip_digest
name
......@@ -135,6 +135,7 @@ def cache_fragment_name(name = {}, options = nil)
end
end
private
def fragment_name_with_digest(name) #:nodoc:
if @virtual_path
[
......@@ -146,7 +147,6 @@ def fragment_name_with_digest(name) #:nodoc:
end
end
private
# TODO: Create an object that has caching read/write on it
def fragment_for(name = {}, options = nil, &block) #:nodoc:
if fragment = controller.read_fragment(name, options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册