'Add
This commit is contained in:
10
auto_cache.py
Normal file
10
auto_cache.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import schedule
|
||||
import time
|
||||
import shutil
|
||||
|
||||
def auto_cache_data():
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
auto_cache_data()
|
||||
5
main.py
5
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("*")
|
||||
|
||||
Reference in New Issue
Block a user