API
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
This commit is contained in:
5
cache.py
5
cache.py
@@ -1,4 +1,5 @@
|
||||
from datetime import datetime, timedelta
|
||||
import os
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
import time
|
||||
@@ -69,5 +70,9 @@ class FileCache():
|
||||
log('adding filecacheobject ' + key)
|
||||
json_data = JsonEncoder().encode(obj)
|
||||
# json_data = json.dumps(obj, cls=JsonEncoder, indent=2)
|
||||
|
||||
# Ensure the filecache directory exists
|
||||
os.makedirs("./filecache", exist_ok=True)
|
||||
|
||||
with open("./filecache/" + key + ".json", 'w+') as f:
|
||||
f.write(json_data)
|
||||
|
||||
Reference in New Issue
Block a user