|
18 | 18 |
|
19 | 19 | from astropy.table import Table, vstack, MaskedColumn
|
20 | 20 |
|
21 |
| -from ..query import BaseQuery |
| 21 | +from astroquery import conf as asq_conf |
| 22 | +from ..query import BaseQuery, QueryWithLogin, AstroQuery, to_cache |
22 | 23 | from ..utils import async_to_sync
|
23 | 24 | from ..utils.class_or_instance import class_or_instance
|
24 | 25 | from ..exceptions import InputWarning, NoResultsWarning, RemoteServiceError
|
@@ -216,11 +217,12 @@ def _request_w_cache(self, method, url, data=None, headers=None, retrieve_all=Tr
|
216 | 217 | # Note: the method only exposes 4 parameters of the underlying _request() function
|
217 | 218 | # to play nice with existing mocks
|
218 | 219 | # Caching: follow BaseQuery._request()'s pattern, which uses an AstroQuery object
|
| 220 | + |
219 | 221 | if not cache:
|
220 | 222 | response = self._request(method, url, data=data, headers=headers, retrieve_all=retrieve_all)
|
221 | 223 | else:
|
222 | 224 | cacher = self._get_cacher(method, url, data, headers, retrieve_all)
|
223 |
| - response = cacher.from_cache(self.cache_location) |
| 225 | + response = cacher.from_cache(self.cache_location, asq_conf.cache_timeout) |
224 | 226 | if not response:
|
225 | 227 | response = self._request(method, url, data=data, headers=headers, retrieve_all=retrieve_all)
|
226 | 228 | to_cache(response, cacher.request_file(self.cache_location))
|
|
0 commit comments