Class: Cloudinary::Cache::KeyValueCacheAdapter

Inherits:
CacheAdapter
  • Object
show all
Defined in:
lib/cloudinary/cache/key_value_cache_adapter.rb

Instance Method Summary collapse

Instance Method Details

#flush_allObject



14
15
16
# File 'lib/cloudinary/cache/key_value_cache_adapter.rb', line 14

def flush_all()
  @storage.flush_all()
end

#get(public_id, type, resource_type, transformation, format) ⇒ Object



4
5
6
7
# 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

#set(public_id, type, resource_type, transformation, format, value) ⇒ Object



9
10
11
12
# 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