instance method
instrument
Ruby on Rails 3.1.12
Since v3.0.20 Private — implementation detail, not part of the public APISignature
instrument(operation, key, options = nil)
No documentation comment.
Parameters
-
operationreq -
keyreq -
optionsopt = nil
Source
# File activesupport/lib/active_support/cache.rb, line 512
def instrument(operation, key, options = nil)
log(operation, key, options)
if self.class.instrument
payload = { :key => key }
payload.merge!(options) if options.is_a?(Hash)
ActiveSupport::Notifications.instrument("cache_#{operation}.active_support", payload){ yield(payload) }
else
yield(nil)
end
end
Defined in activesupport/lib/active_support/cache.rb line 512
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::Store