forked from mirrors/thatmattlove-hyperglass
don't cache errors
This commit is contained in:
parent
0fd5bc7997
commit
3b0abd5ba8
1 changed files with 2 additions and 0 deletions
|
|
@ -138,6 +138,8 @@ async def query(_state: HyperglassState, request: Request, data: Query) -> Query
|
|||
response_format = "text/plain"
|
||||
|
||||
if json_output:
|
||||
if cache_response.get("level") != "success":
|
||||
cache.delete(cache_key)
|
||||
response_format = "application/json"
|
||||
_log.info("Execution completed")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue