mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Cleanup CacheHelper changes allowing opt-out of cache digests
Instead of deleting the skip_digest option flag, this changes the method to merely check the key. This change is because of a discussion in this thread: https://github.com/rails/rails/pull/8317 This commit also makes #fragment_name_with_digest private due to its functionality being subsumed by #cache_fragment_name.
This commit is contained in:
parent
e969ba955d
commit
e105adc240
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ module ActionView
|
|||
# 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 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
def fragment_name_with_digest(name) #:nodoc:
|
||||
if @virtual_path
|
||||
[
|
||||
|
@ -146,7 +147,6 @@ module ActionView
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue