Parent

Methods

Included Modules

GraphiteAPI::Cache::Memory

Public Class Methods

new(options) click to toggle source
# File lib/graphite-api/cache/memory.rb, line 6
def initialize options
  Zscheduler.every(120) { clean(options[:cache]) }
end

Public Instance Methods

get(time, key) click to toggle source
# File lib/graphite-api/cache/memory.rb, line 10
def get time, key
  cache[time.to_i][key]
end
incr(time, key, value) click to toggle source
# File lib/graphite-api/cache/memory.rb, line 18
def incr time, key, value
  set(time, key, value.to_f + get(time, key))
end
set(time, key, value) click to toggle source
# File lib/graphite-api/cache/memory.rb, line 14
def set time, key, value
  cache[time.to_i][key] = value.to_f 
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.