Spaces:
Sleeping
Sleeping
File size: 194 Bytes
3ca2db1 | 1 2 3 4 5 6 7 8 9 10 11 | import redis
import os
from dotenv import load_dotenv
load_dotenv()
r = redis.Redis.from_url(os.getenv("REDIS_URL"))
print(f"Keys in cache: {r.dbsize()}")
r.flushall()
print("Cache cleared.") |