Class: SpreeEcs::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/spree_ecs/base.rb

Direct Known Subclasses

Product, Taxon

Class Method Summary collapse

Class Method Details

.cache(key, options = { :expires_in => 1.day }) ⇒ Object



4
5
6
# File 'lib/spree_ecs/base.rb', line 4

def cache(key, options = { :expires_in => 1.day })
  Rails.cache.fetch("#{Digest::SHA1.hexdigest(key)}",options){ yield }
end

.log(msg) ⇒ Object



8
9
10
# File 'lib/spree_ecs/base.rb', line 8

def log(msg)
  Rails.logger.debug(msg)
end