class MemoryCache():
    def __init__(self) -> None:
        self._cache_data = {}

    def has(self, cache_key: str):
        return cache_key in self._cache_data

    def get(self, cache_key: str):
        return self._cache_data[cache_key]

    def set(self, cache_key: str, data):
        self._cache_data[cache_key] = data

    def has_lock(self, cache_key: str):
        return self.has(cache_key)

    def set_lock(self, cache_key: str):
        return self.set(cache_key, 1)

    def clear_lock(self, cache_key: str):
        del self._cache_data[cache_key]
