Skip to content

Implement the content URI caching feature in a Node environment #1507

Open
@ggrossetie

Description

@ggrossetie

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions