Investigate using `diskcache` for persistent MAST query caching
See original GitHub issueWe could look into using the diskcache
package to cache MAST search operations:
https://pypi.org/project/diskcache/
The package is a disk-based key-value store which makes it easy to specify an expiration time for each entry. This would allow us to e.g. cache search queries for 24 hours, which would significantly speed up searches across different Python processes, whilst largely avoiding the problem of stale search data.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
DiskCache Tutorial - Grant Jenks
The core of DiskCache is diskcache.Cache which represents a disk and file backed cache. As a Cache, it supports a familiar Python mapping...
Read more >caching dynamic documents: Topics by Science.gov
DB caching aims at local processing of declarative queries in a DBMS-managed ... We investigate the application's locality using cache utilization metrics.
Read more >Chapter 11. Enabling caching to improve logical volume ...
This method speeds up access to frequently used data by caching it on the faster volume. The method caches both read and write...
Read more >When a disk cache performs better than an in-memory cache ...
It caches many of the results of these queries for ten or fifteen minutes, which takes a lot of load away from the...
Read more >View Cache data - Chrome Developers
This guide shows you how to use Chrome DevTools to inspect Cache data. If you're trying to inspect HTTP cache data, this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@barentsen this item is to look into possibility of an (interim) MAST query caching until astroquery supports MAST query caching, right?
Thoughts:
request-cache
can be useful inastroquery
layer but probably not helpful for us. More specifically, MAST queries use long polling such that it could involve multiple HTTP calls (i.e., multiple requests). It’s the reason why the current astroquery cache does not work for MAST calls (astroquery’s current cache is also at request level).diskcache
seems to be promising . The@cache.memoize
decorator works on the level comparable tomemoization
.@JWCook Thank you for reaching out.
requests-cache
looks like a fabulous package!The vast majority our requests calls are handled by the
astroquery
package, so I wonder if we ought to look into looking requests caching there.