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
@@ -311,7 +311,7 @@ def _request(self, method, url,
311
311
is True.
312
312
"""
313
313
314
- cache &= conf .cache_active
314
+ cache &= cache_conf .cache_active
315
315
316
316
if save :
317
317
local_filename = url .split ('/' )[- 1 ]
@@ -335,13 +335,13 @@ def _request(self, method, url,
335
335
query = AstroQuery (method , url , params = params , data = data , headers = headers ,
336
336
files = files , timeout = timeout , json = json )
337
337
if (self .cache_location is None ) or (not cache ):
338
- with conf .set_temp ("cache_active" , False ):
338
+ with cache_conf .set_temp ("cache_active" , False ):
339
339
response = query .request (self ._session , stream = stream ,
340
340
auth = auth , verify = verify ,
341
341
allow_redirects = allow_redirects ,
342
342
json = json )
343
343
else :
344
- response = query .from_cache (self .cache_location , conf .cache_timeout )
344
+ response = query .from_cache (self .cache_location , cache_conf .cache_timeout )
345
345
if not response :
346
346
response = query .request (self ._session ,
347
347
self .cache_location ,
@@ -485,7 +485,7 @@ class suspend_cache:
485
485
"""
486
486
487
487
def __init__ (self , obj = None ):
488
- self .original_cache_setting = conf .cache_active
488
+ self .original_cache_setting = cache_conf .cache_active
489
489
490
490
def __enter__ (self ):
491
491
conf .cache_active = False
0 commit comments