File cache.py¶
Go to the documentation of this file
class Cache:
def __init__(self):
self.cachecache = {}
def add(self, key: str, value):
self.cachecache[key] = value
def get(self, key: str):
if key in self.cachecache:
return self.cachecache[key]
else:
raise IndexError(f"Key: {key} not found in cache!")