diff --git a/src/replit/maqpy/files.py b/src/replit/maqpy/files.py index da554c2..259aa42 100644 --- a/src/replit/maqpy/files.py +++ b/src/replit/maqpy/files.py @@ -2,50 +2,7 @@ import flask -class FileCache: - """A simple cache for files.""" - - def __init__(self) -> None: - """Initialize the class.""" - self.data = {} - - def add_to_cache(self, filename: str, content: str) -> None: - """Add a filename to the cache. - - Args: - filename (str): The filename to add. - content (str): The content to add to the cache. - """ - self.data[filename] = content - - def has(self, filename: str) -> bool: - """Whether the cache has a certain filename. - - Args: - filename (str): The filename to check for. - - Returns: - bool: Whether the cache has filename. - """ - return filename in self.data - - def invalidate(self, filename: str) -> None: - """Remove a filename from the cache. - - Args: - filename (str): The filename to remove. - """ - try: - self.data.pop(filename) - except KeyError: - pass - - def flush(self) -> None: - """Remove all values from the cache.""" - self.data = {} - - -cache = FileCache() +cache = {} class File(flask.Response):