mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(api): add route to clear invocation cache
This commit is contained in:
@ -103,3 +103,13 @@ async def set_log_level(
|
|||||||
"""Sets the log verbosity level"""
|
"""Sets the log verbosity level"""
|
||||||
ApiDependencies.invoker.services.logger.setLevel(level)
|
ApiDependencies.invoker.services.logger.setLevel(level)
|
||||||
return LogLevel(ApiDependencies.invoker.services.logger.level)
|
return LogLevel(ApiDependencies.invoker.services.logger.level)
|
||||||
|
|
||||||
|
|
||||||
|
@app_router.delete(
|
||||||
|
"/invocation_cache",
|
||||||
|
operation_id="clear_invocation_cache",
|
||||||
|
responses={200: {"description": "The operation was successful"}},
|
||||||
|
)
|
||||||
|
async def clear_invocation_cache() -> None:
|
||||||
|
"""Clears the invocation cache"""
|
||||||
|
ApiDependencies.invoker.services.invocation_cache.clear()
|
||||||
|
Reference in New Issue
Block a user