def METHOD_NAME(self, key, default=None):
    """
    Get item from the cache and remove it.
    Return default if expired or does not exist.
    """
    with self.__cache_lock:
        ttl_entry = self.__cache.get(key)
        if not ttl_entry:
            return default
        del self.__cache[key]
        value = ttl_entry.value
        if not value:
            # entry expired
            return default
        return value