This commit is contained in:
DingZQ
2025-03-19 21:57:58 +08:00
parent c1a6242d7d
commit fb2f6aee80
2 changed files with 15 additions and 0 deletions

10
auto_cache.py Normal file
View File

@@ -0,0 +1,10 @@
import schedule
import time
import shutil
def auto_cache_data():
if __name__ == "__main__":
auto_cache_data()

View File

@@ -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("*")