Skip to content

Commit 340eeda

Browse files
committed
fix(cache): relocate proxy-checker caches to /tmp/data and add missing import
- Update device IP cache path to `tmp/data/device-ip.json` and add `import os` in `proxy_checker/utils/get_device_ip.py`. - Change public IP cache directory from `/tmp/caches/public-ip` to `/tmp/data/public-ip` in `proxy_checker/utils/get_public_ip.py`. - Organizes cache files under a shared `/tmp/data` directory and prepares filesystem access for further operations.
1 parent 8509bd8 commit 340eeda

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎proxy_checker/utils/get_device_ip.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import re
23
from typing import Optional
34

@@ -30,7 +31,7 @@ def get_device_ip(
3031
verbose: bool
3132
Enable verbose output for underlying requests.
3233
"""
33-
cache = FileCache("tmp/device-ip.json")
34+
cache = FileCache("tmp/data/device-ip.json")
3435

3536
cached = cache.read_cache()
3637
if cached:

‎proxy_checker/utils/get_public_ip.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def get_public_ip(
3333
) -> str:
3434

3535
# ------------ CACHE HANDLING ------------
36-
cache_dir = os.path.join("/tmp/caches/public-ip")
37-
os.makedirs(cache_dir, exist_ok=True)
36+
cache_dir = os.path.join("/tmp/data/public-ip")
3837

3938
proxy_key = (
4039
proxy_info.get("proxy", "")

0 commit comments

Comments
 (0)