Class: RailsBand::ActiveSupport::Event::CacheReadMulti

Inherits:
BaseEvent
  • Object
show all
Defined in:
lib/rails_band/active_support/event/cache_read_multi.rb

Overview

A wrapper for the event that is passed to cache_read_multi.active_support.

Instance Attribute Summary

Attributes inherited from BaseEvent

#allocations, #cpu_time, #duration, #end, #idle_time, #name, #time, #transaction_id

Instance Method Summary collapse

Methods inherited from BaseEvent

#initialize, #slice, #to_h

Constructor Details

This class inherits a constructor from RailsBand::BaseEvent

Instance Method Details

#hits ⇒ Object



18
19
20
# File 'lib/rails_band/active_support/event/cache_read_multi.rb', line 18

def hits
  @hits ||= @event.payload[:hits] || []
end

#key ⇒ Object



8
9
10
# File 'lib/rails_band/active_support/event/cache_read_multi.rb', line 8

def key
  @key ||= @event.payload.fetch(:key)
end

#super_operation ⇒ Object



22
23
24
25
26
# File 'lib/rails_band/active_support/event/cache_read_multi.rb', line 22

def super_operation
  return @super_operation if defined? @super_operation

  @super_operation = @event.payload[:super_operation]
end