We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f95c68 commit 68e6bfeCopy full SHA for 68e6bfe
compiler_backend.py
@@ -233,8 +233,10 @@ def api_compile(self):
233
requestHash = hashlib.sha256(requestJson).hexdigest()[0:12]
234
cacheFn = "%s/compilecache_%s_resp.json" % (TMP_DIR, requestHash)
235
if os.path.exists(cacheFn):
236
- with open(cacheFn, "rt") as f:
237
- self.resp(200, json.loads(f.read()))
+ with open(cacheFn, "rt") as f:
+ response = json.loads(f.read())
238
+ response["fromCache"] = True
239
+ self.resp(200, response)
240
return
241
242
request = json.loads(requestJson)
@@ -274,6 +276,7 @@ def api_compile(self):
274
276
with open(cacheFn, "wt") as f: f.write(json.dumps(response))
275
277
278
response["elapsedMs"] = int((time.time() - start) * 1000)
279
+ response["fromCache"] = False
280
self.resp(200, response)
281
282
def api_compiler_versions(self):
0 commit comments