Skip to content

Commit fd31e78

Browse files
committed
adding cache docs
1 parent fc5208f commit fd31e78

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/index.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,36 @@ uncomment the relevant configuration item(s), and insert your desired value(s).
172172

173173
configuration
174174

175+
176+
Caching
177+
-------
178+
179+
By default Astroquery employs query caching with a timeout of 1 week, although individual services
180+
may have different settings. The user can clear their cache at any time, as well as suspend cache usage,
181+
and change the cache location. Caching persists between Astroquery sessions.
182+
If you know the service you are using has released new data recently, or if you believe you are
183+
not recieving the newest data, try clearing the cache.
184+
185+
The Astroquery cache is divided by service, so each service's cache should be managed invidually.
186+
Shown here are the cache properties, using `~astroquery.simbad.Simbad` as an example.
187+
188+
.. code-block:: python
189+
190+
>>> from astroquery.simbad import Simbad
191+
192+
>>> # Is the cache active?
193+
>>> print(Simbad.cache_active)
194+
True
195+
196+
>>> # Cache location
197+
>>> print(Simbad.cache_location)
198+
/Users/username/.astropy/cache/astroquery/Simbad
199+
200+
>>> # Cache timout in seconds
201+
>>> print(Simbad.cache_timeout)
202+
604800
203+
204+
175205
Available Services
176206
==================
177207

0 commit comments

Comments
 (0)