Sha256: 1be5b1ccfb32ea3707ab8d9fdf6f7575c93dcd5c1561382dc5358d1acc9c453c

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

# coding: utf-8

class MemoryCache
  include Singleton

  # create a private instance of MemoryStore
  def initialize
    @memory_store = ::ActiveSupport::Cache::MemoryStore.new
  end

  # this will allow our MemoryCache to be called just like Rails.cache
  # every method passed to it will be passed to our MemoryStore
  def method_missing(m, *args, &block)
    @memory_store.send(m, *args, &block)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rinfo-0.2.0 lib/rinfo/cache.rb