diff --git a/auto_cache.py b/auto_cache.py new file mode 100644 index 0000000..ee09982 --- /dev/null +++ b/auto_cache.py @@ -0,0 +1,10 @@ +import schedule +import time +import shutil + +def auto_cache_data(): + + + +if __name__ == "__main__": + auto_cache_data() diff --git a/main.py b/main.py index 6372007..b1f2d51 100644 --- a/main.py +++ b/main.py @@ -2323,6 +2323,11 @@ async def fastapi_clear_redis(key: str): redis_client.delete(key) return True +@app.post("/clearallredis/") +async def fastapi_clear_all_redis(): + redis_client.flushdb() + return True + @app.get("/queryredis/") async def fastapi_query_redis(): return redis_client.keys("*")