module BusinessFlow::Cacheable

Extends the DSL to support caching of completed processes

Public Class Methods

included(klass) click to toggle source
# File lib/business_flow/cacheable.rb, line 4
def self.included(klass)
  klass.extend(ClassMethods)
end

Public Instance Methods

cache_key() click to toggle source
# File lib/business_flow/cacheable.rb, line 8
def cache_key
  klass = self.class
  key = Digest::SHA256.hexdigest(klass.cache_key.call(self, nil).to_s)
  "#{klass.name.underscore}/#{key}/v3"
end