Module: BusinessFlow::Cacheable
- Defined in:
- lib/business_flow/cacheable.rb
Overview
Extends the DSL to support caching of completed processes
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/business_flow/cacheable.rb', line 4 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#cache_key ⇒ Object
8 9 10 11 12 |
# 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}/v2" end |