diff --git a/src/replit/maqpy/files.py b/src/replit/maqpy/files.py index ce3a874..da554c2 100644 --- a/src/replit/maqpy/files.py +++ b/src/replit/maqpy/files.py @@ -62,8 +62,9 @@ class File(flask.Response): self.filename = str(filename) self.no_cache = no_cache - # load file - if filename not in cache: + if filename in cache: + self.content = cache[filename] + else: with open(filename, "r") as f: self.content = f.read()