Sha256: 72adceb660dbdd4f37d795b0020e1eee89c9a391c87f40a7fd4ab564e32cb389

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

class Stormy::Caches::MemoryCache < Stormy::Caches::Base

  def initialize(app)
    super
    @data = {}
  end

  protected

  def build_cache_key(category,key)
    "#{category}--#{key.gsub("/","--")}"
  end


  def get(category,key)
    @data[build_cache_key(category,key)]
  end


  def put(category,key,value)
    @data[build_cache_key(category,key)] = value
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stormy-0.0.1 lib/stormy/caches/memory_cache.rb