mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -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
51
lib/cloudinary/cache/storage/key_value_storage.py
vendored
Normal file
51
lib/cloudinary/cache/storage/key_value_storage.py
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
|
||||
class KeyValueStorage:
|
||||
"""
|
||||
A simple key-value storage abstract base class
|
||||
"""
|
||||
__metaclass__ = ABCMeta
|
||||
|
||||
@abstractmethod
|
||||
def get(self, key):
|
||||
"""
|
||||
Get a value identified by the given key
|
||||
|
||||
:param key: The unique identifier
|
||||
|
||||
:return: The value identified by key or None if no value was found
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def set(self, key, value):
|
||||
"""
|
||||
Store the value identified by the key
|
||||
|
||||
:param key: The unique identifier
|
||||
:param value: Value to store
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def delete(self, key):
|
||||
"""
|
||||
Deletes item by key
|
||||
|
||||
:param key: The unique identifier
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def clear(self):
|
||||
"""
|
||||
Clears all entries
|
||||
|
||||
:return: bool True on success or False on failure
|
||||
"""
|
||||
raise NotImplementedError
|
Loading…
Add table
Add a link
Reference in a new issue