redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

feat: Always cache remote content by default #160

Open jboxman opened 3 years ago

jboxman commented 3 years ago

This is possible.

https://docs.asciidoctor.org/asciidoc/latest/directives/include-uri/#caching-uri-content

Reading content from a URI is obviously much slower than reading it from a local file.

Asciidoctor provides a way for the content read from a URI to be cached, which is highly recommended.

To enable the built-in cache, you must:

  1. Install the open-uri-cached gem.

  2. Set the cache-uri attribute in the document.

When these two conditions are satisfied, Asciidoctor caches content read from a URI according the to HTTP caching recommendations.

And these remote calls might be why in some rare situations, ascii_binder hangs forever.