mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Update cloudinary to 1.20.0
This commit is contained in:
parent
1c56d9c513
commit
2984629b39
27 changed files with 2865 additions and 923 deletions
63
lib/cloudinary/cache/adapter/cache_adapter.py
vendored
Normal file
63
lib/cloudinary/cache/adapter/cache_adapter.py
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
|
||||
class CacheAdapter:
|
||||
"""
|
||||
CacheAdapter Abstract Base Class
|
||||
"""
|
||||
__metaclass__ = ABCMeta
|
||||
|
||||
@abstractmethod
|
||||
def get(self, public_id, type, resource_type, transformation, format):
|
||||
"""
|
||||
Gets value specified by parameters
|
||||
|
||||
:param public_id: The public ID of the resource
|
||||
:param type: The storage type
|
||||
:param resource_type: The type of the resource
|
||||
:param transformation: The transformation string
|
||||
:param format: The format of the resource
|
||||
|
||||
:return: None|mixed value, None if not found
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def set(self, public_id, type, resource_type, transformation, format, value):
|
||||
"""
|
||||
Sets value specified by parameters
|
||||
|
||||
:param public_id: The public ID of the resource
|
||||
:param type: The storage type
|
||||
:param resource_type: The type of the resource
|
||||
:param transformation: The transformation string
|
||||
:param format: The format of the resource
|
||||
:param value: The value to set
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def delete(self, public_id, type, resource_type, transformation, format):
|
||||
"""
|
||||
Deletes entry specified by parameters
|
||||
|
||||
:param public_id: The public ID of the resource
|
||||
:param type: The storage type
|
||||
:param resource_type: The type of the resource
|
||||
:param transformation: The transformation string
|
||||
:param format: The format of the resource
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def flush_all(self):
|
||||
"""
|
||||
Flushes all entries from cache
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
Loading…
Add table
Add a link
Reference in a new issue