code: def cache(cls, func):
          
  
          @functools.wraps(func)
          def func_wrapper(*args, **kwargs):
              func_key = cls.get_key(func)
              val_cache = cls.get_cache(func_key)
              lock = cls.get_cache_lock(func_key)
  
              return cls._get_value_from_cache(
                  func, val_cache, lock, *args, **kwargs)
  
          return func_wrapper
docs: Global cache decorator
  
          :param func: the function to be decorated
          :return: the decorator