Sha256: eaadb1845dce50f640459366d348be9e1c663b80e1404045dad2359a5c5eddfd

Contents?: true

Size: 351 Bytes

Versions: 5

Compression:

Stored size: 351 Bytes

Contents

class CacheStore
  attr_accessor :store
  def initialize(cache="#{File.expand_path(File.dirname(__FILE__))}/cache.pstore")
    @store = PStore.new(cache)
  end 
  def put(store_name, obj)
    @store.transaction { @store[store_name] = obj }
  end
  def get(store_name)
    @store.transaction { |store_keeper| store_keeper.fetch(store_name) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qa_robusta-0.1.9 common/lib/cache.rb
qa_robusta-0.1.8 common/lib/cache.rb
qa_robusta-0.1.5 common/lib/cache.rb
qa_robusta-0.1.4 common/lib/cache.rb
qa_robusta-0.1.3 common/lib/cache.rb