-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow user to explicitly manage pystow cache (for downloaded sqlite dbs) #792
Comments
From @gouttegd: My 2 cents, as someone having implemented caching features for a couple of projects (GrainyHead, Pebble): 12:39 |
Is there an interest in allowing file-specific cache lifetimes? That is, allowing users to say: “I want most SQLite DBs to be refreshed once every week, except This seems a bit “overkill” to me, but asking just in case. |
I personally like
|
This seems quite useful and not really overkill - we could easily have
rules for specific resources and even regexes
…On Sat, Aug 17, 2024 at 5:20 AM Damien Goutte-Gattat < ***@***.***> wrote:
Is there an interest in allowing file-specific cache lifetimes?
That is, allowing users to say: “I want most SQLite DBs to be refreshed
once every week, except uberon.db which should be refreshed once every
month”?
This seems a bit “overkill” to me, but asking just in case.
—
Reply to this email directly, view it on GitHub
<#792 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMOL7J6Z24ZQMADW2MIDZR452DAVCNFSM6AAAAABMS7C6XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUHA2DIMRWGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK, code-wise this is something that can easily be added to the infrastructure I propose in #799 (basically instead of having one global CachePolicy, the file cache can have a default policy and a map associating filename patterns to specific policies). As for how the user would control that: I am reluctant to exposing such a feature on the command line, and I don’t think it would be practical anyway (obviously the user wouldn’t want to state the file-specific policies on every call). So, the default policy and the file-specific policies would only be configurable through a config file (
(As seen in the last example, this would be using shell-type “glob” patterns, rather than regular expressions. I do think regexes would be overkill here.) The |
Copy from Slack:
@turbomam wrote:
I am writing about how great OAK is for a NMDC value set task. But I just realized that this
$(RUN) runoak --input sqlite:obo:envo info .desc//p=i ENVO:00000428 > $ @
local/biome-info.txt:
does not retrieve forest biome or any of its children
UPDATE_ My cached ~/.data/oaklib/envo.db was from March 9th 2023! (edited)
Chris Mungall
Today at 11:35 AM
Answered separately but the issue here is that it’s easy for cached versions to become stale. There is some discussion here: cthoyt/pystow#54
I think OAK should more actively manage the cache for you but open to ideas about how this should be done
The text was updated successfully, but these errors were encountered: