class MemoryCache

Public Class Methods

new() click to toggle source

create a private instance of MemoryStore

# File lib/rinfo/cache.rb, line 7
def initialize
  @memory_store = ::ActiveSupport::Cache::MemoryStore.new
end

Public Instance Methods

method_missing(m, *args, &block) click to toggle source

this will allow our MemoryCache to be called just like Rails.cache every method passed to it will be passed to our MemoryStore

# File lib/rinfo/cache.rb, line 13
def method_missing(m, *args, &block)
  @memory_store.send(m, *args, &block)
end