Spaces:
Sleeping
Sleeping
Download scripts/clear_cache.py from harshrawat18/govbridge-api: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/harshrawat18/govbridge-api/resolve/main/scripts/clear_cache.py
- Command line
-
hf download hf://spaces/harshrawat18/govbridge-api/scripts/clear_cache.py
-
curl -L -o clear_cache.py https://huggingface.co/spaces/harshrawat18/govbridge-api/resolve/main/scripts/clear_cache.py
511 Bytes
| import os | |
| from supabase import create_client | |
| import sys | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from config import settings | |
| SUPABASE_URL = settings.SUPABASE_URL | |
| SUPABASE_KEY = settings.SUPABASE_KEY | |
| def main(): | |
| supabase = create_client(SUPABASE_URL, SUPABASE_KEY) | |
| supabase.table('query_cache').delete().neq('id', '00000000-0000-0000-0000-000000000000').execute() | |
| print("🎉 Pollution cleared. Query cache is now empty.") | |
| if __name__ == "__main__": | |
| main() | |