21
21
from astropy .utils import deprecated
22
22
from astropy .utils .exceptions import AstropyDeprecationWarning
23
23
24
- from astroquery import version , log , conf
24
+ from astroquery import version , log , cache_conf
25
25
from astroquery .utils import system_tools
26
26
27
27
@@ -319,7 +319,7 @@ def _request(self, method, url,
319
319
json = json
320
320
)
321
321
322
- cache &= conf .cache_active
322
+ cache &= cache_conf .cache_active
323
323
324
324
if save :
325
325
local_filename = url .split ('/' )[- 1 ]
@@ -341,13 +341,13 @@ def _request(self, method, url,
341
341
else :
342
342
query = AstroQuery (method , url , ** req_kwargs )
343
343
if (self .cache_location is None ) or (not cache ):
344
- with conf .set_temp ("cache_active" , False ):
344
+ with cache_conf .set_temp ("cache_active" , False ):
345
345
response = query .request (self ._session , stream = stream ,
346
346
auth = auth , verify = verify ,
347
347
allow_redirects = allow_redirects ,
348
348
json = json )
349
349
else :
350
- response = query .from_cache (self .cache_location , conf .cache_timeout )
350
+ response = query .from_cache (self .cache_location , cache_conf .cache_timeout )
351
351
if not response :
352
352
response = query .request (self ._session ,
353
353
self .cache_location ,
@@ -491,7 +491,7 @@ class suspend_cache:
491
491
"""
492
492
493
493
def __init__ (self , obj = None ):
494
- self .original_cache_setting = conf .cache_active
494
+ self .original_cache_setting = cache_conf .cache_active
495
495
496
496
def __enter__ (self ):
497
497
conf .cache_active = False
0 commit comments