Class: DeloreanTestBed::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/delorean_test_bed/cache.rb

Class Method Summary collapse

Class Method Details

.cacheObject

Set our own cache or read the setup one



8
9
10
# File 'lib/delorean_test_bed/cache.rb', line 8

def self.cache
  ActiveSupport::Cache.lookup_store(Rails.application.config.cache_store)
end

.read(k) ⇒ Object



16
17
18
# File 'lib/delorean_test_bed/cache.rb', line 16

def self.read(k)
  cache.read([:delorean,:key])
end

.write(k, v) ⇒ Object



12
13
14
# File 'lib/delorean_test_bed/cache.rb', line 12

def self.write(k,v)
  cache.write([:delorean,:key],v)
end