mperham/dalli — pull request #348 by cjbottaro (2013-03-28 21:03:04+00:00)
Title: Better AS instrumentation for read via fetch

Hey Mike,

When the cache_read.active_support notification is fired from a fetch, there is no way to tell if it was a hit or miss. This commit fixes that:

```ruby
ActiveSupport::Notifications.subscribe("cache_read.active_support") do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
puts event.inspect
end

d.fetch("chris"){ 2 }
#"chris", :super_operation=>:fetch, :hit=>false}, @time=2013-03-28 15:55:37 -0500, @transaction_id="a80629976560437da29d", @end=2013-03-28 15:55:37 -0500, @duration=0.307>
=> 2

d.fetch("chris"){ 2 }
#"chris", :super_operation=>:fetch, :hit=>true}, @time=2013-03-28 15:55:42 -0500, @transaction_id="a80629976560437da29d", @end=2013-03-28 15:55:42 -0500, @duration=0.301>
=> 2
```

Notice the `:hit` key in `@payload` changes.

Hope you're doing well,
-- C