Date: 2018-01-14
Accepted
Grimoire is great as a single source of truth due do it's well designed data-model. The APIs Grimoire exposes have the following drawbacks however:
artifact
" (namespaces, defs, version, etc.)artifact
could be something like [bidi "2.1.3"]
hereIn order to make Grimoire data as easy to use as possible from a wide variety of languages we will implement a minimal "cache" API on top.
This API will have the following properties:
An initial implementation of this cache can be fund in cljdoc.cache
(as of
fc3c6b2
). A spec has been written in cljdoc.spec
. The cache follows the basic form of
{:cache-id {,,,}
:cache-contents {,,,}}
Cache storage could also be implemented as a storage implementation for Grimoire. Benefit would be that all Grimoire operations are supported. Given that we want to expose an API with only a very small subset of Grimoire's and do that for multiple languages the utility of this is not immediately apparent.
The cache map may be extended in the future. Especially a timestamp about when it was generated could be useful to validate that a bundle has been regenerated at a certain point in time.
Since cache-map generation and structure may change over the course of time
and also will become a primary API some versioning should also be considered.
This could be as simple as an additional field :cache-format 1
, where 1
gets incremented any time the cache format changes.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close