-
Notifications
You must be signed in to change notification settings - Fork 7
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
getIndex() should obey age= even if index is cached #584
Comments
A key line is Line 357 in e234f90
which is a bit tricky as things stand now. We want to check the age of the cache, and compare that with age. Therefore, the cache ought to save the time of caching. I'll check into that. |
I'm taking notes here, so there is no action for co-authors and nothing pushed to GH until I say so... I have the following working
so we I can make it obey the |
I added #' @family functions relating to cached values to the cached-related functions, so the docs will hint users as to related functions. That can help when looking through documentation. |
I've added new functions argoFloatsClearCache()
argoFloatsListCache()
argoFloatsWhenCached() which will help with debugging. |
I think the new R method of handling text encoding may be slowing down the interpretation of profile types (deep etc) because they are using listening for dogs barking ...
heard 5 dogs
... took 0.1 seconds |
Although I think it's a net gain to be displaying elapsed times in the debugging output, the numbers can be strange (e.g. see below). I am finding that if I use > i<-getIndex("core",debug=3)
getIndex(filename="core", server=c("ifremer-https,usgodae)", destdir="~/data/argo") { ...
Converted filename='core' to filename='ar_index_global_prof.txt.gz'.
Set destfileRda="~/data/argo/ar_index_global_prof.rda".
getIndex() is about to check the cache
argoFloatsIsCached(name="core") {
returning FALSE
} argoFloatsIsCached()
This destfileRda already exists, and its age is 0.784 days.
Using existing destfileRda, since its age is under 1 days.
About to load '~/data/argo/ar_index_global_prof.rda'...
... took 3.82633 seconds
Storing this index in memory for this R session.
argoFloatsStoreInCache(name="core")
} argoFloatsStoreInCache()
} # getIndex() took 3.723904 seconds |
Done in commit 1616646 of "develop_kelley" branch. That branch (as it is now, or with slight changes) will likely be merged into "develop" by some time next week. |
I merged "develop_kelley" into "develop" about an hour ago (for another issue). Therefore, I am asking @j-harbin to take a look, and to either close this issue or to add more comments so I know what to look at next. PS. I'm sorry that this and a lot of other issues from March have been ignored for so long. I guess other things came up, and I don't often look at the issues page for this repo (unlike for 'oce', which I check several times per week). |
I just noticed this months-old issue. I ran a test, as below, and this convinces me that the code does what it is supposed to do, and so I'm closing the issue. (@j-harbin is now working on other projects, so I will give myself permission to close issues with approval.) Note that it took 5 minutes to download the index file. That's a new record, I think. Sheesh. Maybe if Argo charged 10 cents per download they could pay for better servers.
|
This is problematic because if I user does:
It will not force a redownload because the second
getIndex()
looks to see if index is cached.The text was updated successfully, but these errors were encountered: