Class: Card::Rule::Cache

Inherits:
Object show all
Defined in:
card/lib/card/rule/cache.rb

Direct Known Subclasses

PreferenceCache, ReadRuleCache

Class Method Summary collapse

Class Method Details

.clearObject



35
36
37
# File 'card/lib/card/rule/cache.rb', line 35

def clear
  Card.cache.write cache_key, nil
end

.populateObject



31
32
33
# File 'card/lib/card/rule/cache.rb', line 31

def populate
  Card.cache.write cache_key, lookup_hash
end

.readObject



27
28
29
# File 'card/lib/card/rule/cache.rb', line 27

def read
  Card.cache.read(cache_key) || populate
end