Skip to content
Browse files

remove unused payloads in blocks in caching instrumentation

  • Loading branch information...
1 parent 7d659ae commit ca9fc5aea7c78871381149b7650fc16a86e8153c @vipulnsward vipulnsward committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/cache.rb
View
6 activesupport/lib/active_support/cache.rb
@@ -344,7 +344,7 @@ def read_multi(*names)
# Options are passed to the underlying cache implementation.
def write(name, value, options = nil)
options = merged_options(options)
- instrument(:write, name, options) do |payload|
+ instrument(:write, name, options) do
entry = Entry.new(value, options)
write_entry(namespaced_key(name, options), entry, options)
end
@@ -355,7 +355,7 @@ def write(name, value, options = nil)
# Options are passed to the underlying cache implementation.
def delete(name, options = nil)
options = merged_options(options)
- instrument(:delete, name) do |payload|
+ instrument(:delete, name) do
delete_entry(namespaced_key(name, options), options)
end
end
@@ -365,7 +365,7 @@ def delete(name, options = nil)
# Options are passed to the underlying cache implementation.
def exist?(name, options = nil)
options = merged_options(options)
- instrument(:exist?, name) do |payload|
+ instrument(:exist?, name) do
entry = read_entry(namespaced_key(name, options), options)
entry && !entry.expired?
end

0 comments on commit ca9fc5a

Please sign in to comment.
Something went wrong with that request. Please try again.