Class: ApiBlueprint::Cache
- Inherits:
-
Object
- Object
- ApiBlueprint::Cache
- Extended by:
- Dry::Initializer
- Defined in:
- lib/api-blueprint/cache.rb
Instance Method Summary collapse
- #exist?(id) ⇒ Boolean
- #generate_cache_key(klass, options) ⇒ Object
- #read(id) ⇒ Object
- #write(id, data, options) ⇒ Object
Instance Method Details
#exist?(id) ⇒ Boolean
7 8 9 |
# File 'lib/api-blueprint/cache.rb', line 7 def exist?(id) false end |
#generate_cache_key(klass, options) ⇒ Object
19 20 21 22 23 |
# File 'lib/api-blueprint/cache.rb', line 19 def generate_cache_key(klass, ) = .clone.except :body = Digest::MD5.hexdigest Marshal::dump(.to_s.chars.sort.join) "#{key}:#{klass&.name}:#{options_digest}" end |
#read(id) ⇒ Object
11 12 13 |
# File 'lib/api-blueprint/cache.rb', line 11 def read(id) false end |
#write(id, data, options) ⇒ Object
15 16 17 |
# File 'lib/api-blueprint/cache.rb', line 15 def write(id, data, ) data end |