Class: Fino::Rails::Instrumentation::Cache

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Fino::Rails::Instrumentation
Defined in:
lib/fino/rails/instrumentation/cache.rb

Instance Method Summary collapse

Instance Method Details

#delete(key) ⇒ Object



37
38
39
40
41
# File 'lib/fino/rails/instrumentation/cache.rb', line 37

def delete(key)
  instrument(__method__, key: key) do
    cache.delete(key)
  end
end

#fetch(key) ⇒ Object



25
26
27
28
29
# File 'lib/fino/rails/instrumentation/cache.rb', line 25

def fetch(key, ...)
  instrument(__method__, key: key) do
    cache.fetch(key, ...)
  end
end

#fetch_multi(*keys, &block) ⇒ Object



31
32
33
34
35
# File 'lib/fino/rails/instrumentation/cache.rb', line 31

def fetch_multi(*keys, &block)
  instrument(__method__, keys: keys.join(", ")) do
    cache.fetch_multi(*keys, &block)
  end
end

#read(key) ⇒ Object



13
14
15
16
17
# File 'lib/fino/rails/instrumentation/cache.rb', line 13

def read(key)
  instrument(__method__, key: key) do
    cache.read(key)
  end
end

#write(key) ⇒ Object



19
20
21
22
23
# File 'lib/fino/rails/instrumentation/cache.rb', line 19

def write(key, ...)
  instrument(__method__, key: key) do
    cache.write(key, ...)
  end
end