@@ 13,7 13,7 @@ path = os.environ.get("PATH_INFO")
if not path or path == "/":
cache = None
try:
- with open("post-cache.json") as f:
+ with open("/tmp/post-cache.json") as f:
cache = json.loads(f.read())
except:
pass
@@ 31,7 31,7 @@ if not path or path == "/":
for i in j[:30]]
posts = [p.json() for p in posts]
# XXX: This is not thread-safe but who cares lol
- with open("post-cache.json", "w") as f:
+ with open("/tmp/post-cache.json", "w") as f:
f.write(json.dumps({
"posts": posts,
"date": datetime.timestamp(datetime.now()),