Skip to content
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

Cacheing #6

Open
twomagpi opened this issue Aug 21, 2015 · 1 comment
Open

Cacheing #6

twomagpi opened this issue Aug 21, 2015 · 1 comment

Comments

@twomagpi
Copy link
Contributor

Some objects (location being the obvious one) are likely to be repeated multiple times within a dataset. To prevent this duplication we should perhaps permit a cache key on the same level as metadata and records that will contain an object with keys (md5, sha?) that can be referred to later in the file. Eg

"cache": { "e54789a3": {a GeoJSON boject},
                "680f038d": "A base64 encoded file"}
}

Records in the cache could then be referred to in other elements of the file with a cache object

 "location":{"ref$": "e54789a3" }
@thibautjombart
Copy link
Member

That sounds like a very good idea. I would go for SHA1 - I think the package 'digest' should do the trick, e.g.:

> library(digest)
> digest("EpiJSON rules!!!", algo="sha1")
[1] "e6e6f50bb3cb5985de0d9b21e5087e047e6aeea6"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants