Open
Description
Asciidoctor provides a built-in cache for content URI (based on open-uri-cached
gem).
Currently, this feature is not available in Asciidoctor.js because the open-uri-cached
is not transpile from Ruby to JavaScript.
I think it could be great to implement this feature in a Node environment. This feature will use the cache-uri
attribute to enable the cache (similar to what Asciidoctor Ruby is doing: https://docs.asciidoctor.org/asciidoc/latest/directives/include-uri/#caching-uri-content)
To implement this feature, we could use: https://github.com/isaacs/node-lru-cache in order to set expiration time depending on response headers, configure a default max size, etc...