class Cloudinary::Cache::KeyValueCacheAdapter
Public Instance Methods
Source
# File lib/cloudinary/cache/key_value_cache_adapter.rb, line 14 def flush_all() @storage.flush_all() end
Source
# File lib/cloudinary/cache/key_value_cache_adapter.rb, line 4 def get(public_id, type, resource_type, transformation, format) key = generate_cache_key(public_id, type, resource_type, transformation, format) @storage.get(key) end
Source
# File lib/cloudinary/cache/key_value_cache_adapter.rb, line 9 def set(public_id, type, resource_type, transformation, format, value) key = generate_cache_key(public_id, type, resource_type, transformation, format) @storage.set(key, value) end
Private Instance Methods
Source
# File lib/cloudinary/cache/key_value_cache_adapter.rb, line 20 def generate_cache_key(public_id, type, resource_type, transformation, format) Digest::SHA1.hexdigest [public_id, type, resource_type, transformation, format].reject(&:blank?) end